[Gdal-dev] How to clean up gdal rasters in python?

Jose Luis Gomez Dans josegomez at gmx.net
Tue May 22 05:23:16 EDT 2007


Hi!
I have a python program that reprojects a large number of large images. Often, it crashes with an out of memory error (GDAL 1.4.0, HDF driver on Linux/i386). I create many rasters, open them (with gdal.Open()), but assumed that Pythons Garbage Collector was looking after my memory. Before I delve deeper into the code, I'd like to know whether it is good practice to delete gdal handlers in Python. This is for old-gen python, but I wonder whether it has changed/will change for ngpython. The Python bit of the API tutorial does not mention cleaning up for Python...

Cheers!
Jose
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser



More information about the Gdal-dev mailing list