> as a follow up, here is an interesting behaviour when used with 2.3: > > Python 2.3a0 (#29, Oct 7 2002, 19:54:53) [MSC 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> b = {} > [3319 refs] > >>> for i in range(1000000): > ... b[i]=[i]*60 > ... > [62003414 refs] > >>> for k in range(1000000): > ... del b[k] > ... > [1003419 refs] > >>> print b[0] > Traceback (most recent call last): > File "<stdin>", line 1, in ? > KeyError: 0 > [1003458 refs] > >>> print len(b.keys()) > 0 > [1003621 refs] > > The funny thing is, the memory allocated by python_d.exe *INCREASES* when I > do the del b[k]-bit thingy. OK, so I guess its time to do a gc: No, there are no cycles in the data structures you create here. I suspect another CYGWIN malloc bug. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4