Delete target object from event handler collections when it has no more event handlers by lostmsu · Pull Request #1973 · pythonnet/pythonnet
What does this implement/fix? Explain your changes.
The objects were leaking because they were kept as keys in a dictionary, that stored event handlers corresponding to object.
This change ensures that when the last handler is removed from an object, the object is removed from that dictionary.
Does this close any currently open issues?
fixes #1972
Checklist
Check all those that are applicable and complete.
- Make sure to include one or more tests for your change
- Updated the
CHANGELOG