[ROOT] TGString and TGText not derived from TObject

From: cstrato@EUnet.at
Date: Sun Aug 12 2001 - 18:30:21 MEST


Dear Rooters

To prevent memory leaks caused by e.g.:
   fFrame->AddFrame(new TGLabel(fFrame,new TGString("Author Name:")),
             new TGLayoutHints(kLHintsTop | kLHintsLeft));

I converted this line to:
   fCleanup = new TList;
   vL1 = new TGLayoutHints(kLHintsTop | kLHintsLeft);
   fCleanup->Add(vL1);
   TGString *vStr = new TGString("Author Name:");
   fCleanup->Add(vStr);
   TGLabel vLab = new TGLabel(fFrame,vStr);
   fCleanup->Add(vLab);
   fFrame->AddFrame(vLab, vL1);

Sorrowly, I cannot add TGString to fCleanup since it is not derived
from TObject.

Is there a certain  reason, why TGString, TGText and TGTextBuffer
are not derived from TObject? Is it possible to change this?

Thank you in advance

Best regards
Christian
----------------------------------
C.h.r.i.s.t.i.a.n  S.t.r.a.t.o.w.a
V.i.e.n.n.a,  A.u.s.t.r.i.a



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:57 MET