[gdal-dev] FlushCache and SyncToDisk

Ari Jolma ari.jolma at tkk.fi
Mon Mar 24 16:30:22 EDT 2008


Frank Warmerdam kirjoitti:
> Ari Jolma wrote:
>> Frank,
>>
>> I may have wondered and asked this before but anyway. Why don't the 
>> dataset and layer destructors check, if they were opened as update 
>> and call FlushCache or SyncToDisk in the destructor?
>>
>> I thought about adding this into the wrappers but eAccess is a 
>> protected member of GDALDataset for example.
>
> Ari,
>
> All driver implementations are supposed to flush to disk when the
> datasource/dataset is destroyed.  If they don't, it is a bug in the
> driver implementation and should (IMHO) be addressed there.
>
> A problem I think we have had sometimes in the swig bindings is
> that confusion about reference counting has resulted in the
> datasource/dataset objects not being properly destroyed.  But I
> think we also need to solve the root of this problem (if it still
> exists), not work around the symptoms.

Yes, whatever the problem was that I thought I saw, is not there any 
more. Sorry.

Ari

>
> Best regards,


-- 
Prof. Ari Jolma
Geoinformatiikka / Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma




More information about the gdal-dev mailing list