Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    SceneHook Freeing Every execution pass

    SDK Help
    0
    2
    179
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post