Re: is it memory leak?

Rene Brun (Rene.Brun@cern.ch)
Sat, 03 Oct 1998 11:28:48 +0200


Valeriy Onuchin wrote:
>
> Hello Rooters!
>
> When I create TH1 histo with the same name as
> some exisiting hist , it prints
>
> Warning("Build","Replacing existing histogram: %s",GetName());
> gDirectory->GetList()->Remove(hold);
>
> that just remove "hold" from dir but doesn't delete "hold"
> ( as it was in previous versions). Why ???
>

This was requested recently in a roottalk mail. In principle,
one could imagine the following options:
1- Warning printed, Remove but not Delete (new default)
2- Warning printed, Remove AND Delete (old default)
3- ERROR: No Remove or Delete
4- No Warning printed. Remove but not Delete
5- No Warning printed. Remove AND Delete

I welcome comments.

Rene Brun