[Python-Dev] reference leaks, del, and annotations (original) (raw)
Thomas Wouters thomas at python.org
Sat Apr 1 12:23:32 CEST 2006
- Previous message: [Python-Dev] reference leaks, __del__, and annotations
- Next message: [Python-Dev] reference leaks, __del__, and annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
D'oh--not-sounding-gross-failed-ly y'rs,
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/4e3ae5ea/attachment.html
- Previous message: [Python-Dev] reference leaks, __del__, and annotations
- Next message: [Python-Dev] reference leaks, __del__, and annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]