Cem Karan wrote:
I tend to structure my code as a tree or DAG of objects.  The owner refers to
the owned object, but the owned object has no reference to its owner.  With
callbacks, you get cycles, where the owned owns the owner.

This is why I suggested registering a listener object
plus a method name instead of a callback. It avoids that
reference cycle, because there is no long-lived callback
object keeping a reference to the listener.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to