Message57351
Looks like the memory _is_ freed. As Guido said, "It may be available
for reallocation within Python, just not given back to the operating
system". I suggest closing this as invalid.
paul@gonzo:~$ python
Python 2.3.5 (#2, Oct 16 2006, 19:19:48)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> len ([object for object in gc.get_objects () if isinstance (object,
list)])
25
>>> aList = []
>>> for i in xrange(5E5):
... aList += [[]]
... for j in xrange(10):
... aList[-1].append([]
...
...
KeyboardInterrupt
>>> aList[-1].append([]
KeyboardInterrupt
>>>
paul@gonzo:~/emacs$ python
Python 2.3.5 (#2, Oct 16 2006, 19:19:48)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> len ([object for object in gc.get_objects () if isinstance (object,
list)])
25
>>> aList = []
>>> for i in xrange(5E5):
... aList += [[]]
... for j in xrange(10):
... aList[-1].append([])
...
__main__:1: DeprecationWarning: integer argument expected, got float
>>> del aList
>>> len ([object for object in gc.get_objects () if isinstance (object,
list)])
25 |
|
| Date |
User |
Action |
Args |
| 2007-11-10 15:34:38 | _doublep | set | spambayes_score: 0.0259673 -> 0.025967298 recipients:
+ _doublep, gvanrossum, christian.heimes, pythonmeister |
| 2007-11-10 15:34:38 | _doublep | set | spambayes_score: 0.0259673 -> 0.0259673 messageid: <[email protected]> |
| 2007-11-10 15:34:38 | _doublep | link | issue1405 messages |
| 2007-11-10 15:34:38 | _doublep | create | |
|