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

fix: double free segfault when using Handle_Poly_Triangulation_ctor #159

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

DSchroer
Copy link
Contributor

Handle_Poly_Triangulation_ctor caused a segfault since the underlying Triangulation would be freed twice. Once when the new handle was dropped and once when the UniquePtr was dropped. By passing ownership to the triangulation this is fixed.

Copy link
Owner

@bschwind bschwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks as always :)

Random aside - do you think unique_ptr was the right choice for all of the bridge code, or would shared_ptr have been the better approach? This is one aspect of the bindings I'm still unsure about.

@bschwind bschwind merged commit 22f5d54 into bschwind:main Jan 14, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants