-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
OptimizableGraph deletes Parameters even when G2O_NO_IMPLICIT_OWNERSHIP_OF_OBJECTS=ON #695
Comments
I saw that the pymem branch has a lot of related changes, but if possible I'd like to stick with the stable branch for now. Or is the shared pointer version considered "stable enough"? |
Sounds like a bug in that feature flag :( |
I didn't have any other problems with that flag, and managing resources rust-side is actually pretty easy once the ownership problems [1] are straightened out . It's just RAII semantics after all. I could work with a But please don't let this stop you from merging the changes though, smart pointers are way better for C++ users of the library, who should be an overwhelming majority. [1]: There are bigger problems with wrapping |
Hi,
I'm writing a Rust binding for g2o, and I've been using
G2O_NO_IMPLICIT_OWNERSHIP_OF_OBJECTS
, because it fits the Rust ownership model (somewhat) better.I ran into a strange double free with
addParameter
, and it was surprising to see that the pointer gets released whenOptimizableGraph
is destroyed. I understand that the documentation ofG2O_NO_IMPLICIT_OWNERSHIP_OF_OBJECTS
statesbut it also seems to affect robust kernels for example, and it was surprising to see that it doesn't affect the destruction of parameters.
Is this intended?
The text was updated successfully, but these errors were encountered: