Question about garbage collection

Chris Angelico rosuav at gmail.com
Mon Jan 15 16:57:27 EST 2024


On Tue, 16 Jan 2024 at 06:32, Akkana Peck via Python-list
<python-list at python.org> wrote:
>
> > Frank Millman wrote at 2024-1-15 15:51 +0200:
> > >I have read that one should not have to worry about garbage collection
> > >in modern versions of Python - it 'just works'.
>
> Dieter Maurer via Python-list writes:
> > There are still some isolated cases when not all objects
> > in an unreachable cycle are destroyed
> > (see e.g. step 2 of
> > "https://devguide.python.org/internals/garbage-collector/index.html#destroying-unreachable-objects").
>
> Also be warned that some modules (particularly if they're based on libraries not written in Python) might not garbage collect, so you may need to use other methods of cleaning up after those objects.
>

Got any examples of that?

ChrisA


More information about the Python-list mailing list