Hello Brett,
Thank you very much.
Could you tell me demerits of using
> hist->SetDirectory(0);
if any.
I do not understand why only histogram (and some other class) uses special 'owner' system. In other words, I do not know the merit of being owned by a directory.
Sincerely,
OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo
5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
Phone/Fax : +81 4-7136-3153
Skype : okumura.akira
On 2006/06/15, at 23:23, Brett Viren wrote:
> "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.
>
>
Received on Mon Jun 26 2006 - 16:20:02 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET