python - What does cpython do to help detect object cycles(reference counting)? -


What have I read about cpython? It seems that this reference count + other (I'm right if I'm wrong). Can anyone explain something extra? This guarantee also does not leak * any cycle? If not, can there be no leak in any research in the algorithm to refer to any mistake? Is it just a non-reference count that is tracing every time so many times?

* Bugfixes and problems with modules using the foreign function interface

As stated in the documentation, there is no guarantee that there is no leak; In particular, cyclical objects with the __ del __ methods are not collected by default. For such items, the cyclical link has to be broken manually to enable GC to be forwarded.

Through the browsing which I understand, the interpreter maintains the context of all objects in its control. The "Extra" garbage collector runs a mark and sweep algorithm through the heap, remembers for each object that it is accessible from "outside" and if not, it is removed (GC, but it is < Code> GC module can be explicitly run with a generation argument.)

Only the efficient algorithm that I could think of fulfills your criteria To really get a "full" C increase in algorithm which would reference count and it looks like being implemented in Python. Although I am not an expert in these cases.


Comments