TObjectTable::Remove

Hi,

Trying to solve memory leaks problems, I’m now facing what I think is a double delete, as I get messages like :

W-TObjectTable::Remove: 0xbffdcc00 not found at 4062

So my questions : is my diagnosis of a double delete correct ? and is there a way to know what class the object at address mentioned is ?

Thanks,

Hi,

it’s a symptom of creating an object, switching TObjectTable’s statistics off by calling TObject::SetObjectStat(kFALSE), then deleting the object, and then requesting a dump of the TObjectTable. By disabling the statistics, the object’s destructor doesn’t de-register itself from the TObjectTable, and when printing the TObjectTable’s database one of its entries now points to an invalid memory space, which produces the message you saw.

So you should be able to ignore it; it is not a sign of a double delete. You might want to use valgrind to track down issues with memory leaks.

Cheers, Axel.

Hi Axel,

Thanks for your answer, but I do not switchoff objet statistics at all… (at least not intentionally)

Hi,
this happens by default, see system.rootrc:
Root.ObjectStat: 0
Axel.

Yep, I know that, but I have explicity put it at 1 in my .rootrc :wink:

Hi,
this would mean that the TObject destructor is not called when deleting one of your objects, as in TObject* o = new TObject; delete ((void*)o); You might be able to set a breakpoint where the object #4062 registers, and check its type, and put a breakpoint at its destructor to verify my guess.
Cheers, Axel.