[mapguide-internals] Found at least one memory leaks in Mapguide API

Bruno Scott bscott at geomapgis.com
Tue Jul 7 04:36:00 EDT 2009


Hi Walt

I've try to isolate the members one by one in the constructor, that pointed
me to the class that may leak.
it turn out to be m_taskPane that leak.
So i put my fos on that class and i may have found some, could you tell me
if i'm right

1)
in the function MgWebLayout::ParseTaskBar there is
   taskList->Add(ParseWidget(elt));
should it be 
   Ptr<MgWebWidget> widget = ParseWidget(elt); 
   taskList->Add(widget);

2)
MgWebTaskBar is a member of MgWebTaskPane, in his own constructor we have
this
    for(int i = 0; i < 4; i++)
    {
        MgWebTaskBarWidget* btn = new MgWebTaskBarWidget();
        if(btn == NULL)
            throw new MgOutOfMemoryException(...
        m_taskButtons->Add(btn);
    }
Shouldn't it be
    for(int i = 0; i < 4; i++)
    {
        Ptr<MgWebTaskBarWidget> btn = new MgWebTaskBarWidget();
        if(btn == NULL)
            throw new MgOutOfMemoryException(...
        m_taskButtons->Add(btn);
    }


Bruno

-- 
View this message in context: http://n2.nabble.com/Found-at-least-one-memory-leaks-in-Mapguide-API-tp3212879p3218043.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.


More information about the mapguide-internals mailing list