THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/06/2012 at 14:36, xxxxxxxx wrote:
Cinema 4D Version: 13
Platform: Windows ; Mac ;
Language(s) : C++ ;
Is Free() called from an object plugin when a render is done via interactive render or if the render is done in the picture viewer? This seems to be teh case and it is causing my plugin to crash. Is there a way to determine if a render is happening in those places?
On 26/06/2012 at 14:57, xxxxxxxx wrote:
Actually, let me amend that. I know how to check if the external renderer is running, using
but how do you check to see if the interactive renderer is running?
On 27/06/2012 at 00:07, xxxxxxxx wrote:
Why does it depend on the kind of rendering if your object has to freed or not?
Are you sure your memory management is OK?
On 27/06/2012 at 06:18, xxxxxxxx wrote:
Anything returned from GetVirtualObjects() (and similar methods) passes memory management control to Cinema 4D. So, if you allocate a bunch of new objects and return them (say, in a grouping Null object) then they do not need to be freed since Cinema 4D handles this as owner of that memory.
Also remember that in any render cases, Cinema 4D make a copy of the Document before and for rendering.
On 01/07/2012 at 10:14, xxxxxxxx wrote:
You're both right. I wasn't managing my memory properly. Thanks guys.