Question about garbage collection

Skip Montanaro skip.montanaro at gmail.com
Mon Jan 15 09:14:20 EST 2024


> I do have several circular references. My experience is that if I do not
> take some action to break the references when closing the session, the
> objects remain alive. Below is a very simple program to illustrate this.
>
> Am I missing something? All comments appreciated.

Python has normal reference counting, but also has a cyclic garbage
collector. Here's plenty of detail about how it works:

https://devguide.python.org/internals/garbage-collector/index.html

Skip


More information about the Python-list mailing list