Pmw: how to clear ScrolledListBox ?

Rainer Deyke root at rainerdeyke.com
Sun Jun 24 23:03:33 EDT 2001


<phawkins at spamnotconnact.com> wrote in message
news:wk7ky1paha.fsf at mail.connact.com...
> >>>>> "JP" == Jacek Pop³awski <jp at ulgo.koti.com.pl> 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 rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list