Changes between Initial Version and Version 1 of Ticket #14711, comment 31


Ignore:
Timestamp:
Sep 28, 2013, 11:00:10 PM (9 years ago)
Author:
Simon King
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14711, comment 31

    initial v1  
    88Would this save us?
    99
    10 We want that a strong reference to Q keeps phi alive. Well, it does, since we added a strong reference Q->phi.
     10We want that a strong reference [edit: I mean an external strong reference] to Q keeps phi alive. Well, it does, since we added a strong reference Q->phi.
    1111
    1212We want that phi can be collected, if no external strong reference to Q exists. Well, there only are weak references from the `MonoDict` to phi and to Q. Hence, the only strong reference to phi comes from Q, and the only strong reference to Q comes from phi. This is a circle, that Python's cyclic garbage collector can deal with. Both Q and phi would be collected, and removed from the `MonoDict`.