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

Thiago Macieira thiago.macieira at intel.com
Fri Jul 7 18:29:12 CEST 2017


On sexta-feira, 7 de julho de 2017 06:30:22 PDT Phil Bouchard wrote:
> > how do you solve the situation that an object might be referenced by
> > multiple roots?
> 
> Please elaborate because as far as I know variables in Javascript have a
> function scope and functions can be nested (waterfall parent-child
> hierarchy). So child functions can access the parent variables because the
> root_ptr of the child will be deleted before its parent.

Both in HTML and in QML, JS objects may be used to interchange data between 
multiple pages. That means the object belongs to both pages and should not be 
freed until both of them stop referencing it.

> Thus all I need to do is:
> - add some implicit parameter to functions which will represent return
> variables
> - remove the ability of root_ptr from unifying with other sets

You're speaking in abstract terms. We actually need code.

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




More information about the Development mailing list