Skip to content

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

Closed
@wence-

Description

@wence-

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions