Hi,

I have a small Python script that uses ReadRaster to collect some values in 
order to do some math.

The problem is that once I run the script through a Python IDE I can see the 
memory usage increasing but it does 
not decrease at the end. 

After some runs I got a out of memory crash on the IDE itself (PythonWin).

My code is something like that:

{{{

for b in range(nbands):
  for yoff in range(ysize):
    for xoff in range(xsize):
      buffer = ds.ReadRaster(xoff,yoff,1,1,1,1,datatype,range(1,1+nbands)
      #
      # formulas and numpy calls
      #
      buffer = None
      
ds = None

}}}

I am running with all my formulas commented just to isolate the memory problem. 
It just reads and does nothing.

Does anybody has any advise on how to free that buffer?

Thanks in advance,

Regards,

Ivan


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to