[mapguide-users] Re: Mapguide JavaAjaxViewer Update Features Memory
Leak?
jjdoc
jjdoc at mailcity.com
Wed Dec 15 00:51:45 EST 2010
Hi Zac,
Here is the releaseReader Code I used. Please let me know if you see any
problems with it:
void ReleaseReader(MgPropertyCollection res, MgFeatureCommandCollection
commands) throws Exception
{
if (res == null)
return;
for(int i = 0; i < res.GetCount(); i++)
{
MgFeatureCommand cmd = commands.GetItem(i);
if(cmd instanceof MgUpdateFeatures)
{
if (res.GetItem(i).GetPropertyType() !=
MgPropertyType.Feature) {
continue;
}
MgFeatureProperty resProp =
(MgFeatureProperty)res.GetItem(i);
if(resProp != null)
{
MgFeatureReader reader
=(MgFeatureReader)resProp.GetValue();
if(reader == null) {
continue;
}
reader.Close();
}
}
}
}
Thanks.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapguide-JavaAjaxViewer-Update-Features-Memory-Leak-tp5833542p5837243.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list