Can I use assign to duplicate an object of objects?
I have an object that inherits in 3rd degree from TPersistent and I want to clone it using the Assign procedure. MyFirstObj := GrandSonOfPersistent.Create(); //I modify the objects inside MyFirstObj MySecondObj := GrandSonOfPersistent.Create(); MySecondObj.Assign(MyFirstObject); How can I check it worked? Does it work when the objects have many other objects? I am trying to clone an object, is this the correct way to do it? Assign is a virtual method. Any descendent classes that inherit from TPersistent should override Assign to handle deep copying of any new members added on top of the base