Details
-
Type:
Improvement
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: sphgeom
-
Labels:
Description
The sphgeom pybind11 wrappers have many instances of wrapped functions returning a unique pointer by releasing it just before returning it. Removing the call to .release() causes segfaults in all cases I tried except when it appears in the first function in a pickle wrapper (the one that appears on the Python side as __getstate__). I find this very surprising because the seemingly identical function encode() does segfault if .release() is removed.
Pim Schellart [X] asked me to file this ticket to figure out what's going on and remove the calls to .release() if possible.
Removing all the release() calls and the now-redundant lambdas seems to work properly, at least as far as sphgeom's unit tests are concerned.