0

I reading a book "fluent python" which states the garbage collection as the following:

In CPython, the primary algorithm for garbage collection is reference counting. Es‐ sentially, each object keeps count of how many references point to it. As soon as that refcount reaches zero, the object is immediately destroyed: CPython calls the __del__ method on the object (if defined) and then frees the memory allocated to the object. In CPython 2.0, a generational garbage collection algorithm was added to detect groups of objects involved in reference cycles—which may be unreachable even with outstanding references to them, when all the mutual references are contained within the group. Other implementations of Python have more sophisticated garbage collectors that do not rely on reference counting, which means the __del__ method may not be called immediately when there are no more references to the object. See “PyPy, Garbage Col‐ lection, and a Deadlock” by A. Jesse Jiryu Davis for discussion of improper and proper use of __del__.

As for the "outstanding reference", I am very confused.

I looked up outstanding in Oxford Dictionary:

1. Exceptionally good.
2. Not yet paid, resolved, or dealt with.

What does it mean here? it seems not make sense to take it as "exceptionally good"

2

1 Answer 1

1

In your example, the phrase

outstanding references

means there are still references to the object, and those references have not been closed, so the garbage collection algorithm should not destroy them sicne they may still be referenced.

There is also

John is out standing in his field

enter image description here

Which is a play on words since it could mean

John is a notable in his area of expertise.

or

John is standing in a field.

(Sorry, I couldn't resist)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .