[gdal-dev] Regarding to the memory management in the SWIG API
szekerest at gmail.com
Wed Jan 8 02:10:58 PST 2014
Is that intentional that we don't call ReleaseResultset within the
destructor of the OGR Layer object? Actually the destructor is not even
generated (at least for the C# API) which seems to be an improper solution
and leads to memory leaks, definitely. However ReleaseResultset is exposed
in the API, but it's fairly dangerous to let the user decide whether to
call this method or not.
In my understanding the destructor of the Layer object should look
something like the destructor of the DataSource (but calling
ReleaseResultset instead of ReleaseDatasource). However modifying the code
this way, may lead to a crash for the existing code which call
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev