I have a .root file without directories in which I store many objects. I would like to delete some of them, so I do:
TFile *file = new TFile("file.root","update");
for(int i=150;i<200;i++)
{
file->Delete(Form("object%d;*",i));
}
After that I no longer see these objects in file.root, but the size of this file on disk is still the same as before deleting objects. What can I do to reduce file’s size after deleting objects from it?