Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up API use for c_pointer objects with FFI::AutoPointer #26

Open
turboladen opened this issue Jul 30, 2021 · 0 comments
Open

Clean up API use for c_pointer objects with FFI::AutoPointer #26

turboladen opened this issue Jul 30, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@turboladen
Copy link
Contributor

Some ffi-gdal wrapper objects need to call a GDAL free/release/whatever function on the wrapped auto-pointer. Right now, the instantiation of those pointers (ex. via OGRCreateGeometry()) is all one-off; in other words, the pointer that's returned from the FFI call has to manually be set to autorelease = false, leaving it really easy to miss these cases. It'd be nice to have each of these cases either define their own AutoPointer class (like in the Pointers wiki page), or at least just define a class-level release method, then all of these things can easily be enforced across the board using rbs.

@turboladen turboladen added the enhancement New feature or request label Jul 30, 2021
@turboladen turboladen modified the milestones: 2.0, 1.x Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant