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 Tue Jun 07 2005 - 14:09:53 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET