Mike Meyer wrote: > > Unknown. Python relies on the C alloc/free routines for handling > memory. del may immediately free() the memory (I don't know), but that > doesn't mean it gets released to the OS. None of the implementations > of alloc/free I'm aware of ever give the memory back to the OS. They > store it in a data structure for internal reuse. > ... and in any serious OS, if memory is not reused it will eventually page out anyway, so the total cost of not releasing the memory back to the OS is miniscule (an entry or two in a page table) and the benefit of releasing it basically nil[*], while the effort of working out whether memory can be released or not is possibly quite significant.
[* Excepting possible swap-space exhaustion, I suppose.] -- http://mail.python.org/mailman/listinfo/python-list