2 ms·
I think the idiomatic way is with weakref https://docs.python.org/3/library/weakref.html https://docs.python.org/3/library/weakref.html Particularly note "fin
by bobbyi_settv 6y ago
I think the idiomatic way is with weakref
https://docs.python.org/3/library/weakref.html https://docs.python.org/3/library/weakref.html
Particularly note "finalize provides a straight forward way to register a cleanup function to be called when an object is garbage collected"