[mapguide-trac] #1960: ByteSource and ByteReader memory leak in
Java Api
MapGuide Open Source
trac_mapguide at osgeo.org
Fri Mar 2 01:13:34 EST 2012
#1960: ByteSource and ByteReader memory leak in Java Api
------------------------+---------------------------------------------------
Reporter: hubu | Owner: Andy Zhang
Type: defect | Status: new
Priority: high | Milestone: 2.3
Component: Web API | Version: 2.2.0
Severity: critical | Keywords: Memory leak
External_id: 1453408 |
------------------------+---------------------------------------------------
Memory leak happens when get MgByteReader from a MgByteSource. This only
happens in Java Api. It's a Swig issue.
Here is the sample code:
for (int i = 0; i < maxCount; i++)
{
MgByteSource byteSource = new
MgByteSource(xmlBytes, xmlBytes.length);
MgByteReader
layerDefinitionNewResourceContent = byteSource.GetReader();
layerDefinitionNewResourceContent.delete();
layerDefinitionNewResourceContent = null;
byteSource.delete();
byteSource = null;
System.gc();
}
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/1960>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list