Skip to content

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

@turboladen

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions