Opened 19 years ago

Last modified 19 years ago

#663 closed defect (fixed)

Memory leak using OCI

Reported by: lsassolini@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: major Keywords:
Cc: ivano.picco@…

Description

I've used the standard loop:
 
     while ((aOGRFeatureH = OGR_L_GetNextFeature(aLayerH)) != NULL)
         OGR_F_Destroy(aOGRFeatureH);
 
 with an OCILayer containing only geometries of type "wkbLineString".
  
 It seams that memory isn't freed: I used the Process window in Task Manager 
Window to control memoy allocation: memory usage increases about 9 Mega for 
every loop.
  
 If I read the same geometries with the same loop but from a shapefile 
 I don't have any memory problem.

I used a shapefile to load the oracle table (with ogr2ogr).
The shapefile contains 9926 features.
The .shp is about 1280 kb, the dbf file is 224 Kb.
I'm using Oracle 9.2.0.1 and gdal12 with Windows XP.
I can send the shapefile if useful

Change History (1)

comment:1 by warmerdam, 19 years ago

I have confirmed this problem, and correct it. 

The OCI geometry "objects" were never being freed.  I have corrected this
in gdal/ogr/ogrsf_frmts/oci/ogrocilayer.cpp.

Please feel free to grab a nightly snapshot tomorrow or pulling from CVS to 
try this out. 


Note: See TracTickets for help on using tickets.