forcing list garbage collection
Alex Martelli
aleax at aleax.it
Fri Oct 11 14:52:33 EDT 2002
More information about the Python-list mailing list
Fri Oct 11 14:52:33 EDT 2002
- Previous message (by thread): forcing list garbage collection
- Next message (by thread): Leibniz_Pi.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
les wrote: > Hi, > dictionaries have a clear() method, do lists have something similar? alist[:] = [] for example. Or, "del alist[:]". > i would like to list to empty and memory recollected right away. Just like adict with adict.clear(), alist does become empty with this slice assignment or deletion -- but when the memory is collected is not guaranteed and is an implementation detail (exactly like for adict.clear(), again). Alex
- Previous message (by thread): forcing list garbage collection
- Next message (by thread): Leibniz_Pi.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list