Memory Leaks



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

    On 08/07/2003 at 17:26, xxxxxxxx wrote:

    What do you mean by you are allocating them in the class? Do you mean in the class constructor? Then you have to free them anyway.
    Some lines of code would help finding the problem...
    Best
    Samir



  • 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;
    };



  • 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



  • 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



  • 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



  • 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



  • 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



  • 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 :)



  • 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



  • 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



  • 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


Log in to reply