How can I clean the memory used by deleted objects in a TFile/TDirectory?

From: Pierre-Luc Drouin <pldrouin_at_physics.carleton.ca>
Date: Thu, 12 Apr 2007 12:17:09 -0400


Hi,

I have some code that creates and then deletes many objects and (TH, TTree, TDirectory) in a ROOT file and that saves this file with only a few remaining objects. When I reopen the ROOT file I see only the TKeys of the few objects that I have not deleted, but the size of the file is way too big for these objects (it looks like that some previously deleted objects are still using space) . I would like to know how could I clean efficiently the ROOT file. I am using ROOT 5.14/00c. I delete the objects in memory using TDirectory::RecursiveRemove(TObject*) and the TKeys using TDirectory::Delete(char *).

Thanks
Pierre-Luc Drouin Received on Thu Apr 12 2007 - 18:17:21 CEST

This archive was generated by hypermail 2.2.0 : Fri Apr 13 2007 - 23:50:01 CEST