[mapguide-internals] Found at least one memory leaks in
Mapguide API
Walt Welton-Lair
walt.welton-lair at autodesk.com
Tue Jul 7 09:49:45 EDT 2009
Hi Bruno,
Both of those are leaks - good finds.
I actually fixed the first one yesterday as part of https://trac.osgeo.org/mapguide/changeset/3982. But the second one still needs to be fixed. I can submit that today on your behalf.
What happens to your memory usage when both of these are fixed? Does the memory usage hold steady?
Thanks,
Walt
-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Bruno Scott
Sent: Tuesday, July 07, 2009 4:36 AM
To: mapguide-internals at lists.osgeo.org
Subject: RE: [mapguide-internals] Found at least one memory leaks in Mapguide API
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.
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
More information about the mapguide-internals
mailing list