D3 - Programming in 3D

drug drug2004 at bk.ru
Tue Jun 16 12:35:35 UTC 2020


16.06.2020 13:23, FeepingCreature пишет:
> On Monday, 15 June 2020 at 14:38:31 UTC, drug wrote:
>> 15.06.2020 13:40, FeepingCreature пишет:
>>> Your scenario sounds totally predictable? With refcounting you get a 
>>> "free" mark phase (ref goes to 0), and then you know you're holding 
>>> the only reference so you can just hand it off to a cleanup thread 
>>> and stop thinking about it for the low cost of an atomic write.
>>>
>>
>> How do you know that you have the only reference? the node can be both 
>> the root and a leaf node.
>>
> 
> You know you have the only reference because your refcount goes to 0...

How do you know how many childs this node has? You don't know the height 
of the subtree, so you can't predict how many childs will be freed.


More information about the Digitalmars-d mailing list