[gdal-dev] Releasing OGR feature from memory in Java

Even Rouault even.rouault at spatialys.com
Thu Mar 19 08:52:17 PDT 2015


Elke,

Calling DestroyFeature() rather than delete is specific to C++ / Windows. For
Java, calling .delete() or doing nothing special is fine.

Quoting http://gdal.org/java/org/gdal/ogr/Feature.html#delete() :

"""
public void delete()

    Delete (in memory) a feature.

    Calling this method is not required as normal garbage collection will
reclaim associated resources when the object goes out of scope. Otherwise
calling delete() explicitely will help release resources sooner. Don't call any
method on a deleted object !
"""

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list