[mapguide-trac] #830: RichTextEngine leaks memory
MapGuide Open Source
trac_mapguide at osgeo.org
Mon Jan 26 17:58:43 EST 2009
#830: RichTextEngine leaks memory
------------------------------+---------------------------------------------
Reporter: waltweltonlair | Owner: waltweltonlair
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: Server | Version: 2.0.1
Severity: critical | Keywords:
External_id: 1122052.01 |
------------------------------+---------------------------------------------
In RS_FontEngine::!GetTextMetrics the following code leaks memory:
{{{
RichTextEngine richTextEngine(m_pSERenderer, this, &tdef);
bDone = richTextEngine.Parse(s, &ret);
}}}
There are actually a couple of memory issues in the !RichTextEngine class:
* simply creating a !RichTextEngine and deleting it (no call to Parse)
leaks memory
* multiple objects of different types get leaked during the two calls
above (e.g. there are calls to the !AtomTextRun constructor, but no calls
to its destructor)
* there are calls to malloc, but no matching calls to free (delete is
used on one of the malloc'ed pointers, which is incorrect)
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/830>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list