A safe way is to serialize the object, then deserialize. This ensures everything is a brand new reference.
Here's an article about how to do this efficiently.
Caveats: It's possible for classes to override serialization such that new instances are not created, e.g. for singletons. Also this of course doesn't work if your classes aren't Serializable.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…