[gdal-dev] How to delete GDALDriver objects
Kor de Jong
k.dejong at geo.uu.nl
Tue May 27 10:28:06 EDT 2008
Hi all,
I am working on making Valgrind happy with my code and fixed a memory
leak related to GDALDriver objects not being released once my
application ends.
I call GDALAllRegister() and GDALDestroyDriverManager() at the appropriate
times and I think I just found out that GDALDestroyDriverManager() does
not free the memory allocated by the individual GDALDriver objects. Am
I right?
Now I call GDALDriverManager::DeregisterDriver(driver) for each driver
and delete the driver afterwards. This makes Valgrind much happier. But
I guess I am in for some suprises on the Windows platform since I am
deleting objects that have been allocated by the GDal shared library.
My question is: how should I free the individual drivers allocated by
the GDal shared library? Is there a function similar to GDALClose, but
than for GDALDriver objects?
Best regards,
Kor
More information about the gdal-dev
mailing list