RE: Memory leak or valgrind too touchy ?

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 08 Jun 2005 16:03:46 -0500


Hi Jerome,

Thanks for reporting this issues. All this are not 'leaks' but memory that is not cleanup at the end of the process. We are aware to those and know there are annoying. We are current working on a major update to cint and will be close attention to fix this issues also.

> If it didn't, how do i ask that to root

You have to unload the library.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Jerome Glisse
Sent: Tuesday, June 07, 2005 7:09 AM
To: Rene Brun
Cc: roottalk_at_pcroot.cern.ch
Subject: Re: [ROOT] Memory leak or valgrind too touchy ?

On 6/7/05, Rene Brun <brun_at_pcroot.cern.ch> wrote:
> Hi Jerome,
>
> I assume that your executable is linked with some xxxdict.o files
> containing the object dictionaries.
> In this case, the dictionaries contain static objects that will be
> executed once to force the creation of the dictionary for all
> referenced classes. By default these objects will not be destroyed,
> unless you request this explictly.

If there is dictionary then they are from root. My test program is empty and only linked with root. I include the following header of roots:

#include <TObject.h>
#include <TObjArray.h>
#include <TSocket.h>
#include <TServerSocket.h>
#include <TMessage.h>
#include <TThread.h>

And link with root-config --libs
gcc -o ../bin/celld celld.cpp $(root-config --libs) -I$(root-config --incdir)

With celld.cpp :

#include <TObject.h>
#include <TObjArray.h>
#include <TSocket.h>
#include <TServerSocket.h>
#include <TMessage.h>
#include <TThread.h>
 

int main(int argc, char **argv)
{

        G__scratch_all();
}

Compile with
gcc -o ../bin/celld celld.cpp $(root-config --libs) -I$(root-config --incdir)

Test with and without G__scratch_all(); but still same leak reported by valgrind.

Btw does G__scratch_all(); erase static object related to dictionary ? If it didn't, how do i ask that to root ?

Thx for help.

Jerome Glisse Received on Wed Jun 08 2005 - 23:04:19 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET