TFile::Delete a TObject from a directory

[quote]Q2. After closing and reopening the file the ls() changes and no
directory is shown.[/quote] humm … f.Open("test.root", "READ");Does NOT affect the object ‘j’ because TFile::Open is a static function that allocates and return a new object. i.e. TFile *f2 TFile::Open("test.root", "READ"); f2->ls(); f2->Close();will work better.

Cheers,
Philippe.