THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/09/2008 at 04:47, xxxxxxxx wrote:
Cinema 4D Version: 9.6-11
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
I have an object plugin that has a big bunch of own data. Ok, everything works fine except for the CopyTo() part. I am copying all the data over to the destination node when CopyTo is called. It´s all working fine however somehow my memory starts to fill up without any reason.
Are there any flags where one should NOT copy over the private data? (although I never had any problems with copyto in the past and it seems copying my data to the destination node is necessary).
Is it the undo buffer maybe? When I delete my object this memory is not freed. I triple checked my code. I am freeing any allocated memory in my destructors (if there is any left).
However, when I close the scene, the memory is freed which tells me that it could be the undo buffer (The debug console also does NOT give me any memory leaks, so it´s somehow related to the scene storing the copied memory somewhere...we are talking about 50MB or more per CopyTo, just as a side note). Any idea what this is all about?
I did some tests and when I don´t copy my data to the destination when the flags are COPY_NO_HIERARCHY and COPY_NO_BRANCHES (which seem the most fitting, though I must admit I don´t fully know what these flags actually mean concerning private data) and then the memory is not filled up! But the destination node does NOT have my private data then, which doesn´t seem correct to me (as it would mean whereever the destination node is used, it needs to rebuild all the data). But I cannot release with this memory filling up as it kills the RAM in several minutes. :-(
I appreciate quick help as this is really essential to me right now.
Thanks in advance for any kind of help to resolve this issue asap.