yeesian / ArchGDAL.jl

A high level API for GDAL - Geospatial Data Abstraction Library
https://yeesian.github.io/ArchGDAL.jl/stable/
Other
142 stars 26 forks source link

Added IFeature type. Fixed memory leakage for `Feature`s. #294

Closed evetion closed 2 years ago

evetion commented 2 years ago

Triggered by out of memory errors when working with a lot of GeoDataFrames.

It seems that iterate just allocates Features without anyone ever cleaning them. This PR introduces an IFeature (and its parent AbstractFeature), which should align nicely with the other types.

Since GeoDataFrames goes through quite some calls, it is a bit hard to find these things, but I expect this is not the only memory leak remaining.

yeesian commented 2 years ago

Thank you for catching this! Opened #295 so that comprehensive scrubbing of the codebase isn't blocking this fix from being merged.

I still have some concern that we might be introducing a different bug with this change, and will be happy to merge once that's answered/addressed. The rest LGTM.