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

Phil Bouchard philippeb8 at gmail.com
Fri Jul 7 18:44:50 CEST 2017


Thiago Macieira <thiago.macieira at intel.com> wrote:
> 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.
> 

Ok I can reuse my Fornux Calculator parser and mimic a function call in
Javascript.





More information about the Development mailing list