Pmw: how to clear ScrolledListBox ?

Rainer Deyke root at
Mon Jun 25 05:03:33 CEST 2001

<phawkins at> wrote in message
news:wk7ky1paha.fsf at
> >>>>> "JP" == Jacek Pop³awski <jp at> writes:
> JP> Robert Roy wrote:
> >>> I add items by .insert, what is correct way to remove all items?
> >>>
> >> setlist([]) should work.
> JP> what happen with old list? what happen in Python when I allocate
memory for
> JP> something then use another value?
> Garbage collection.

In this case the old list is immediately destroyed.  Garbage collection
collects objects, not memory used internally by a single object.

In Python, there is no way to allocate memory.  You can only create objects
(which are garbage collected).  That these objects use memory behind the
scenes is an implementation detail.

Rainer Deyke (root at
Shareware computer games           - 
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

More information about the Python-list mailing list