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