Jack Bates wrote:
Python's __del__ or destructor method works (above) - but only in the
absence of reference cycles (below). An object, with a __del__ method,
in a reference cycle, causes all objects in the cycle to be
"uncollectable".
Store a weak reference to the object somewhere with a
call
On Wed, Apr 27, 2011 at 5:54 PM, Thomas 'PointedEars' Lahn <
pointede...@web.de> wrote:
> Jack Bates wrote:
> > Faced with the real potential for reference cycles, how can you reliably
> > call code - but wait until an object no longer exists or is
> > "unreachable"?
>
> For normal program termina
Jack Bates wrote:
> Python's __del__ or destructor method works (above) - but only in the
> absence of reference cycles (below). An object, with a __del__ method,
> in a reference cycle, causes all objects in the cycle to be
> "uncollectable". This can cause memory leaks and because the object is
In Python, how can you reliably call code - but wait until an object no
longer exists or is "unreachable"?
I want to ensure that some code is called (excluding some exotic
situations like when the program is killed by a signal not handled by
Python) but can't call it immediately. I want to wait un