[ROOT] memleak in TGGC ?

From: Damir Buskulic (buskulic@lapp.in2p3.fr)
Date: Thu Mar 13 2003 - 17:06:36 MET


Hi,

Why is the following snippet of code leaking ? Did I misunderstood  
something ?
(This is on MacOSX with v3.05/02 but I doubt it has smthing to do with  
the platform)

{
    for (int i=0;i<1000;i++) {
       FontStruct_t smallLabelFont =  
gClient->GetFontByName("-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*- 
iso8859-1");
       TGGC* smallLabelGC = new TGGC(TGLabel::GetDefaultGC());
       smallLabelGC->SetFont(gVirtualX->GetFontHandle(smallLabelFont));
       delete smallLabelGC;
    }
}

Cheers

Damir

====================================
Damir Buskulic,  Universite de Savoie/LAPP
Chemin de Bellevue, B.P. 110, F-74941 Annecy-le-Vieux Cedex, FRANCE
Tel : +33 (0)450091600
e-mail: buskulic@lapp.in2p3.fr
====================================



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET