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

    General help with memory cleanup, etc

    SDK Help
    0
    2
    257
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 18/06/2003 at 11:06, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   6.3 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I am STILL working on this Renderman RIB exporter plugin, and need some help on memory allocation issues.

      • When do I need to use GeAlloc and the like?
      • What do I need to free or destroy at the end of the plugin?

      In my plugin I need to grab objects, texture tags, UV tags, etc. Right now I just define all these as variables (BaseObject *object ; BaseObject *cameraob; BaseTag *ptag; BaseMaterial *material; BaseChannel *channel;  BaseContainer chcontainer; etc), assign them various things as the plugin progresses, and thats about it. Do I need to worry about memory freeing in these instances? Do I need to define the variables differently?
      Thanks for any help.
      matt

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 18/06/2003 at 11:18, xxxxxxxx wrote:

        Hi Matt,
        no, you don´t have to worry about them. Generally Cinema 4D is doing this for you. If you are allocating them yourself with BaseObject::Alloc() i.e. you will have to free them after usage yourself either by calling BaseObject::Free(obj) or insert them into a document/scene.
        Actually if you are allocating memory with GeAlloc you will need to free this by yourself with GeFree(memorytofree);

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