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

Thiago Macieira thiago.macieira at intel.com
Thu Jul 6 07:01:08 CEST 2017


On quarta-feira, 5 de julho de 2017 19:32:35 PDT Phil Bouchard wrote:
> - Well with root_ptr the behavior is 100% predictable thus you won't
> have these rendering lags at random times.

So explain to me how the QML engine should collect JS items that have gone 
unused and unreferenced during the exection. Predictable execution isn't good 
enough if it involves never garbage collecting and thus using a lot more 
memory.

> - The code of Qt will be much simpler.

We can make it even simpler by never free()ing or deleting. That doesn't mean 
it's correct.

> - You won't need a separate thread reserved for the garbage collector if
> that is already the case.

It's not.

> - The objects are destroyed is the exact reverse order they were
> constructed thus this will help debugging.

But unnecessary, since the order they are constructed is irrelevant. The JS 
order matters.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list