I am using GDAL 1.7.1 from ruby1.9 to generate GeoTIFF files. In the tutorial, they recommend using GDALClose () to close the datasets and dump the remaining content into the file system. The same thing happens in the destructor for the dataset. The problem is that ruby bindings rely on this destructor mechanism to close the data set, and I need the result of the file already in the process of generating it. Since ruby is garbage collection, it seems that I cannot reliably close my files without leaving the ruby process. At the moment, I fixed my version of GDAL to support the GDALClose method, but this does not seem to be a good long-term solution.
require 'gdal/gdal' [...]
Is there anything in ruby or swig to trigger a call to the destructor that I might have missed?
source share