RFC: Proposal: Deterministic Object Destruction (Posting On Python-List Prohibited)

Rob Gaddi rgaddi at highlandtechnology.invalid
Thu Mar 1 17:44:31 EST 2018


On 03/01/2018 02:24 PM, Lawrence D’Oliveiro wrote:
> On Thursday, March 1, 2018 at 6:44:39 PM UTC+13, Paul Rubin wrote:
>> DOM trees are a classic example (see the various DOM modules in the
>> Python stdlib). Non-leaf nodes have a list of child nodes, child nodes
>> have pointers back upwards to their parent, and each child node has
>> pointers to its left and right siblings if they exist. It's all very
>> circular.
>> This is why you have weak refs.
>
But making sure that the failure to use weakrefs doesn't memory leak the 
program into the pavement is why you have background garbage collection 
with intelligent cyclical reference breaking.
-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /