script uses up all memory

Chris Angelico rosuav at gmail.com
Thu Mar 6 23:12:54 CET 2014


On Fri, Mar 7, 2014 at 9:07 AM, Larry Martell <larry.martell at gmail.com> wrote:
> Apparently the object returned by that call is immutable as if I look
> at id(self.tools) each pass through the loop, it is different. Is
> there some way I can recover that memory?

Not sure what mutability has to do with that. The changing id() simply
means you're getting back a new object every time. Normally, as soon
as your rebind self.tools to the new object, the old object will be
disposed of - unless it has refloops, which is what I mentioned in the
previous post, or has some other external reference.

ChrisA



More information about the Python-list mailing list