On 08/11/2013 at 17:03, xxxxxxxx wrote:
That would be the best way. There or in a destructor method.
Also, it is essential that one implements Read/Write/CopyTo if data exists as members of your class that isn't in the container but needs to be retained. When Cinema 4D, for instance, renders a document, it copies your plugins (tags, objects, materials, etc.) with the document. If you have essential data or allocated memory in the class, it must be copied to the new copy (set or allocated and so on). When the user saves the document, this data needs to be written explicitly using Write() and then read back in using Read() - order specific.