Opened 13 years ago

Closed 13 years ago

#1862 closed defect (fixed)

CCoordinateSystemEnumInteger32 leaks memory when being destructed

Reported by: baertelchen Owned by: baertelchen
Priority: low Milestone:
Component: General Version: 2.1.0
Severity: trivial Keywords: memory leak coordinate system API CCoordinateSystemEnumInteger32
Cc: External ID:

Description

See implementation in http://svn.osgeo.org/mapguide/trunk/MgDev/Common/CoordinateSystem/CoordSysEnumInteger32.cpp.

The internally held [INT32 *m_pnValues] array is only deleted and re-assigned in the [SetList()] method but not in the destructor.

Change History (1)

comment:1 by baertelchen, 13 years ago

Resolution: fixed
Status: newclosed

Fixed in changeset 6283 (http://trac.osgeo.org/mapguide/changeset/6283).

The main problem is, that the CCoordinateSystemEnumInteger32 class did not delete its [m_pnValues] array which holds all the Integer32 values upon destruction.

Added the delete[] call to the destructor. Also added a call to the [ClearFilter()] so that any such (auto-ptr'ed) values are also released.

Changes reviewed by Walt.

Note: See TracTickets for help on using tickets.