SceneHook Freeing Every execution pass
-
On 08/04/2014 at 07:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15
Platform: Mac ;
Language(s) : C++ ;---------
Hi,I am using Free( GeListNode\* node ) in a SceneHookData plugin. Why would it be getting called every execution pass? Shouldn't it be called once when the SceneHook is freed when C4D quits or the document closes?
Ama
-
On 08/04/2014 at 16:51, xxxxxxxx wrote:
In which SceneHookData method are you calling Free(GeListNode* node)? Hopefully not FreeSceneHook() unless you allocated temporary memory for Free() in InitSceneHook() and you set the pointer to NULL after Free(). In order to allocate something once and free it once (per class instance at least), you need to call the sequence in Init() and Free() respectively. If you are attempting to free the SceneHookData within itself, could you not ask for more pain and suffering? This type of plugin is allocated and freed by Cinema 4D (and only Cinema 4D).
Posting the code you need help with would be very useful.