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

Consider using weakref.finalize rather than __del__ to clean up endpoint #209

Open
wence- opened this issue Mar 14, 2024 · 0 comments
Open

Comments

@wence-
Copy link
Contributor

wence- commented Mar 14, 2024

As discussed starting here #206 (comment), since #206 we attempt to abort the endpoint when the python endpoint is collected (via a __del__ callback). Since this is not the blessed way of implementing finalizers (that's weakref.finalize) we should consider moving to that instead. However, that comes with some potential complications if the Cython wrappers (which hold C++ objects) are participating in reference cycles. If the ref-cycle is broken in a cython object then it is possible that the deallocation that then occurs leaves dangling references.

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

No branches or pull requests

1 participant