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

    Memory Leaks

    SDK Help
    0
    16
    1.5k
    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 08/07/2003 at 18:08, xxxxxxxx wrote:

      Ok here is an example of what I meant by in the class.  Thanks for your help!
      Nate
      class Dialog : public GeDialog
      {  
       public:
      Dialog(void);
        virtual LONG Message(const BaseContainer &msg, BaseContainer &result);
         virtual Bool CreateLayout(void);
         virtual Bool Command(long id,const BaseContainer &msg);
         virtual void Timer(const BaseContainer& msg);
        struct RC_Set
        {
         BaseObject *camera [100];
         RenderData *rset [100];
         BaseDocument *globaldoc;
         Filename FullPath;
        };typedef struct RC_Set RC_Set;
        BaseContainer basecon[11];
        RC_Set RC[11];
        long tempid;
        long cam[11], set[11]; 
        Bool Fin_Array[11];
        BaseDocument *initialdoc;
      };

      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 10/07/2003 at 04:58, xxxxxxxx wrote:

        Hi,
        I have the same problem and a equal debug output. So how can I solve this problem?
        Cathleen

        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 13/07/2003 at 04:07, xxxxxxxx wrote:

          Hi,
          I see no allocation that needs to be freed here.
          Best
          Samir

          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 13/07/2003 at 10:02, xxxxxxxx wrote:

            BaseDocument *globaldoc;
            is just a pointer to a document , you either point it at a document that you create somewhere else or you will need to allocate a document for it.if you allocate this later , youll need to free it for sure.if you point it to another doucment , youll need to free that one (if you made it)
            e.g if you later do globaldoc=LoadDocument(blabla) , you will need to free this globaldoc  yourself before your plugin exits.
            same with all these pointers , if your allocating them somewhere else , you will need to free whatever you put in them.
            depending on what your doing  , its often  usefull to use AutoAlloc , then you dont need to think about allocation.
            there a couple of places that you can deallocate within a GeDialog.
            you can use :
            virtual color=#800080~GeDialog(void); // destructor
            virtual void color=#800080DestroyWindow(void); // geeneral cleanup
            use these to cleanup when the dialog is destroyed.
            cheers
             
            Paul

            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 14/07/2003 at 14:12, xxxxxxxx wrote:

              Thanks I will try all of those suggestions!
              Nate

              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 17/07/2003 at 12:36, xxxxxxxx wrote:

                Hi,
                I have a lot of memory leaks in ge_container.cpp?
                what are the classes that create this leaks? I can't find it out.
                Thanks
                Cathleen

                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 17/07/2003 at 12:42, xxxxxxxx wrote:

                  I think what you see in the debug output window are local parts of an object that has not been freed.
                  so  if you dont release a BaseObject , it wont say in debug "BaseObject not freed"
                  it will spit out lots of lines that are of no use to you at all in finding the leak.
                  all you know is that something was not released and that you should  go find it 🙂

                  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 17/07/2003 at 12:55, xxxxxxxx wrote:

                    Thanks,
                    do you have any ideas? Can that be BaseContainer's thats the only think I know that I don't free. But BaseContainers didn't work with Alloc.
                    Cathleen

                    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 17/07/2003 at 12:59, xxxxxxxx wrote:

                      if you do something like
                      BaseContainer bc;
                      this does not need to be freed

                      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/07/2003 at 03:38, xxxxxxxx wrote:

                        I have found them all.
                        Thanks
                        Cathleen

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