I’m looking for some advice.
I’m writing large trees containing event objects. These objects split up into several sub-objects (tracks, vertices etc.) which are in most cases organised in TClonesArrays. The sub-objects might be interlinked by TRef or TRefArrays.
Recently my program crashes after a while. The way how it crashes looks like a memory leak. Using the TObjectTable printing facility I see a steadily increasing number of TRef objects which I would not expect. The TRef objects are declared in the header of the parent class and defined when the parent class is filled. I do not use the new operator for TRef in any case, because they all have a fixed size. The TRef data members are set to 0 in the destructor and the Clear() function of the parent classes. So, why do the TRef objects reside in memory then? I’m using the same scheme for TVector3 and TLorentzVector objects and here it works perfect.
Any ideas would be greatly appreciated.
I’m using root version 4.00_08 on a linux machine with gcc2.95.3 installed.