Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    DescriptionGetBitmap

    SDK Help
    0
    2
    209
    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 01/10/2007 at 08:56, xxxxxxxx wrote:

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

      ---------
      In the SDK-docu it should be corrected that:

      BaseBitmap* bmp;

      "must not" receive pointer-copies, but preferably

      dgb->bmp = my_permanent_picture->GetClone();

      The actual description is very confusing (I did allocate a bitmap - only not in MSG_DESCRIPTION_GETBITMAP and not a new for every call; I did ensure that the bitmap will be freed - only not in MSG_DESCRIPTION_GETBITMAP but only when the BaseBitmap-sizes change or on termination).

      It took me some debugging iterations through repetitive recursive GETBITMAP-calls to get to the idea not just to pass the pointer, but to provide a copy.

      Actually I don't even know if the clone gets freed, or if I loose memory every time.

      Greetings

      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 01/10/2007 at 15:35, xxxxxxxx wrote:

        "The recipient should allocate a bitmap and assign this pointer. The sender must ensure that the bitmap is freed properly. (Normally this means that CINEMA 4D does the freeing.)"

        Sounds pretty clear to me. I think however, that there is a typo. It should say "...and assign to this pointer".

        Just put an empty "c4d_debug.txt" into your c4d folder. Then the console window will open with c4d. Once you close c4d, memory leaks will be listed there.

        Depending on what you do (for example when you react to the message) the bmp is freed by c4d. Only if you do custom stuff with it, you should make sure to free it yourself. That´s at least my understanding of it.

        Hope that helps

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