In <[EMAIL PROTECTED]>, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> The text you read is still hanging around, waiting for you to use it. Once
>> you are done with it, you might want to reclaim that memory used,
>> especially if it is a 100MB text file:
>>
>> mytext = "" # re-bind the name 'mytext' to the empty string
>
> If you have no further use for the variable, then "del mytext" will
> also free up the memory, and make it clear to the reader that you're
> done with the memory.
It makes clear you're done with the *name* since that's what ``del``
deletes from the namespace, not the object. I know that you know this but
many people seem to think ``del`` get's rid of the object like a call to
`free()` in C.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list