Ticket #2648 (closed defect: fixed)
GDAL reference counting is thread unsafe
|Reported by:||tamas||Owned by:||warmerdam|
Currently the reference counting implementation doesn't use atomic increment and decrement operations, and therefore it may cause memory corruption issues with the garbage collected runtimes like for C#. Attached a C# example which can produce the problem quite systematically.
I think we could utilize something like the InterlockedIncrement/InterlockedDecrement? API on Windows to make these operations atomic.