[Development] Qt 5.9's new garbage collector documentation? + root_ptr
Phil Bouchard
philippeb8 at gmail.com
Sat Jul 15 22:58:08 CEST 2017
On 07/15/2017 02:26 PM, Phil Bouchard wrote:
> On 07/15/2017 02:17 PM, Tim Blechmann wrote:
>>>> fwiw, to get this thread back to the main topic, i still fail to see
>>>> how
>>>> root_ptr deals with objects which are reachable from multiple roots,
>>>> which have independent lifetime
>>>
>>> Please provide an example.
>>
>> i've posted some already
>
> I'm working on the parser right now but I thought I proved my point with
> the following code:
>
> var temporary = 0;
>
> var bar = function (object)
> {
> return 10;
> };
>
> var foo = function ()
> {
> var object;
> var result = function() { return object; };
> return function() { return bar( object ); };
> };
>
> for (var i = 0; i < 1000000; ++ i)
> console_log((foo())(temporary));
Alright I got good news: the parser already generates code that compiles
and works!
I still need to fix minor issues but I am on the right path.
More information about the Development
mailing list