[fdo-users] how can I clean up memory for
OSGeo.FDO.Geometry.IGeometry
Greg Boone
greg.boone at autodesk.com
Mon Aug 15 11:16:05 EDT 2011
Any object that is derived from FdoIDisposable, including the Geometry objects, has an associated reference count. This reference count will be incremented as it is created in FDO/Providers and returned to the caller. It is the responsibility of the caller to ensure the object's refcount is decremented once the client has finished using the object and no longer holds a reference to it. This addref/release process is typically accomplished with the use of the FdoPtr<> template object.
Of course my response assumes you are using unmanaged C++. For Managed C++, this re-counting should happen seamlessly under the covers, but there has been cases where we have had to tweak our code to ensure the objects are released. Typically this has happened in for loops where we have to change these to use the "using" statement.
Greg
-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Ray
Sent: Monday, August 15, 2011 10:47 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] how can I clean up memory for OSGeo.FDO.Geometry.IGeometry
OSGeo.FDO.Geometry.IGeometry is an interface. How can I clean up the memory for the underneath geometry. For exampel, using FDOreader, I read in an OSGeo.FDO.Geometry.IGeometry, then cast it to a ILineString. After I am done with it, how could I clean the ILineString?
I have millions of records to read and process. I want to make sure memory is cleaned up promptly. Otherwise, it has performance issue or out of memory.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-can-I-clean-up-memory-for-OSGeo-FDO-Geometry-IGeometry-tp6687715p6687715.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users
More information about the fdo-users
mailing list