Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.097 X-Spam-Evidence: '*H*': 0.81; '*S*': 0.00; 'immutable': 0.09; 'subject:script': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mutability': 0.16; 'normally,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'pass': 0.26; 'header :In-Reply-To:1': 0.27; 'external': 0.29; 'am,': 0.29; 'returned': 0.30; 'message-id:@mail.gmail.com': 0.30; 'getting': 0.31; 'that.': 0.31; 'apparently': 0.31; 'larry': 0.31; 'subject:all': 0.32; 'fri,': 0.33; 'received:google.com': 0.35; 'there': 0.35; 'object,': 0.36; 'changing': 0.37; 'previous': 0.38; 'sure': 0.39; 'mentioned': 0.61; 'new': 0.61; 'simply': 0.61; "you're": 0.61; 'back': 0.62; 'soon': 0.63; 'mar': 0.68; 'different.': 0.84; 'recover': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=gcbt3wwKxNRyhj7oTSlb6QC4orN9p5aBkXjqC9RqCWM=; b=eqTqpX+WWNib+AUXeGhOQxVRMY2VOZeaKhQbIi6zSIgHaAapTZAsnR1uHtsfcO/N9X KkMTP7/KnFs6InjJiERA6f4KVTz6up7YmkwkfNBV/xqqyL2N2uQJPrErDxr8Ir+OcbRv Kf3XMUhs7Uo9GJ4+NSsvaVG189Nq4JHWyR8wogzxLMlvVx5w1S7MzAD7Ir/jK1ZHpgnM SxieVIfoHdZCHgkyS8FwPFy2ajg8QLXYT2fEqja6br6CgYnoF02XdbsLR2prVsp3C+OP WGQH15MPrYn2MPw0+F9tkMdrqVNWG7u1y/5nOl8HEbKNCfH1z/BqcmQOGVdWidrzu2so vLBg== MIME-Version: 1.0 X-Received: by 10.68.112.164 with SMTP id ir4mr17206407pbb.153.1394143974107; Thu, 06 Mar 2014 14:12:54 -0800 (PST) In-Reply-To: References: Date: Fri, 7 Mar 2014 09:12:54 +1100 Subject: Re: script uses up all memory From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1394143977 news.xs4all.nl 2842 [2001:888:2000:d::a6]:49171 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67956 On Fri, Mar 7, 2014 at 9:07 AM, Larry Martell 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