Hi,
someone has to delete an objects that got created via new. In the cases you refer to the directory serves as a fall-back. The histogram / directory relation has some tradition e.g. in PAW.
Axel.
OKUMURA, Akira wrote:
> Hello Brett,
>
> Thank you very much.
>
> Could you tell me demerits of using
>> hist->SetDirectory(0);
>> "OKUMURA, Akira" <oxon_at_icrr.u-tokyo.ac.jp> writes: >> >>> If I make a class which has histogram as a member as below, at the >>> line of declaration of 'MyClass b' ROOT warns 'Potential memory leak'. >> >> If you don't want ROOT to track your histograms (which is what is >> behind this "Potential memory leak" message) then call >> >> hist->SetDirectory(0); >> >> after you create it. >> >> -Brett. >> >>
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET