Closed aeisenbarth closed 8 months ago
Thanks @aeisenbarth for the very clear issue and tests. I’ll take a look later today and release a fix asap
Actually I know exactly what cause it… sorry about that, will fix very soon
v0.10.2 has the fix and is deploying now
Thanks! All test pass again!
Description
I use psygnal on a metaclass level to be notified when a class instance is created or garbage-collected. This allows to register additional setup/cleanup tasks when a third-party class does not provide an API for that. I had implemented this properly using weak references, so that my implementation itself did not keep hard references.
Since psygnal 0.10.1, it seems the signal keeps a reference to the last emitted argument, preventing its garbage-collection.
What I Did
Minimal example:
Example a bit closer to my use case (but without metaclasses etc.)