A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-April/063267.html below:

[Python-Dev] reference leaks, __del__, and annotations

[Python-Dev] reference leaks, __del__, and annotationsThomas Wouters thomas at python.org
Sat Apr 1 12:31:48 CEST 2006
On 4/1/06, Thomas Wouters <thomas at python.org> wrote:
>
>
> On 4/1/06, Jim Jewett <jimjjewett at gmail.com> wrote:
>
> > Nick Coghlan
> > > A simple Boolean attribute (e.g. __finalized__) should be enough. ...
> > > If it's both present and true, the GC can ignore the finaliser on that
> > instance
> >
> > That doesn't really take care of resource release, which needs to be
> > called, and called early.(And the name will sound odd if it holds
> > resources only sometimes, so that it has to flip the __finalized__
> > attribute.)
>
>
> Well, I don't want to sound too gross, but any such class could store its
> resources *in* __finalized__, leaving it an empty container when there is no
> resource to release.
>

Eh, that would mean the attribute would have to be called '__notfinalized__'
of course ;)

--
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060401/12b77b4d/attachment.htm 
More information about the Python-Dev mailing list

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