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/2000-March/002414.html below:

[Patches] Reference cycle collection for Python

[Python-Dev] Re: [Patches] Reference cycle collection for Pythonnascheme@enme.ucalgary.ca nascheme@enme.ucalgary.ca
Wed, 1 Mar 2000 12:29:02 -0700
On Wed, Mar 01, 2000 at 06:07:07PM +0100, Vladimir Marangozov wrote:
> Guido van Rossum wrote:
> > Once we reach the end of the second list, all objects still left in
> > the first list are garbage.  We can destroy them in a similar to the
> > way Neil does this in his code.  Neil calls PyDict_Clear on the
> > dictionaries, and ignores the rest.  Under Neils assumption that all
> > cycles (that he detects) involve dictionaries, that is sufficient.  In
> > our case, we may need a type-specific "clear" function for containers
> > in the type object.
> 
> Couldn't this be done in the object's dealloc function?

No, I don't think so.  The object still has references to it.
You have to be careful about how you break cycles so that memory
is not accessed after it is freed.


    Neil

-- 
"If elected mayor, my first act will be to kill the whole lot of you, and
burn your town to cinders!" -- Groundskeeper Willie



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