On Feb 16, 11:21 pm, Yuanxin Xi <xi11w...@gmail.com> wrote: > I'm having some problems with the memory recycling/garbage collecting > of the following testing code: > > >>> a=[str(i) for i in xrange(10000000)] > > This takes 635m/552m/2044 memory (VIRT/RES/SHR) > > >>> b={} > >>> for i in xrange(10000000): > > ... b[str(i)]=i > > Then the memory usage increased to 1726m/1.6g/2048 > > >>> del b > > I expect the memory usage drop to the ammount before b was > created(635m/552m/2044), but it's actually 1341m/1.2g/2048 snip
'gc.collect()' -- I believe, but I'm not the specialist in it. -- http://mail.python.org/mailman/listinfo/python-list