[Development] Qt 5.9's new garbage collector documentation? + root_ptr

Harri Porten porten at froglogic.com
Fri Jul 7 11:01:03 CEST 2017


On Thu, 6 Jul 2017, Thiago Macieira wrote:

>>> By the way, how does it break the cycle?
>>
>> Like I was saying before, node_ptr enlists each pointee object to the
>> associated root_ptr and when the root_ptr is destroyed then everything
>> gets wiped out.
>
> See above. Your answer is "it doesn't break the cycle".

Right. And from first hand experience I can report: I've tried hard to 
make a deterministic and quick deletion work in a JS engine (through 
reference counting, etc.) but always ended up with leaks.

The scope of JS objects is sometimes also not limited to a single 
container like a HTML page. Often data can be passed/accessed to/from 
other containers. Thus breaking the concept of a isolated roots.

Harri.



More information about the Development mailing list