Put your inner block in a tight loop and throw in a
http://v8.paulfryzel.com/docs/master/classv8_1_1_isolate.html#aaeda5fa60961a3d9d476c46200e30711

isolate->AdjustAmountOfExternalAllocatedMemory(1000000)

in there too and see what happens.


On Tue, Oct 4, 2016 at 3:48 PM, Theodore Dubois <[email protected]> wrote:

> I created the FunctionTemplate inside its own HandleScope which gets
> destroyed before the program finishes, so it should get garbage collected
> before the end of the program. Is that right?
>
> ~Theodore
>
>
> On Oct 4, 2016, at 3:45 PM, Zac Hansen <[email protected]> wrote:
>
> The way I read it is that because the function template remains until the
> end of the program, its data cannot be cleaned up.  And since it has to
> keep str around until the function template goes away, str won't be cleaned
> up either because there's still a reference to it.
>
> On Tue, Oct 4, 2016 at 2:19 PM, Theodore Dubois <[email protected]> wrote:
>
>> Interesting. So when a function template is created, its callback data
>> will never be freed?
>>
>> ~Theodore
>>
>> On Oct 4, 2016, at 1:17 AM, Jochen Eisinger <[email protected]> wrote:
>>
>> v8 has an per-isolate cache of function templates. As the string is
>> referenced by the function template, it will never go out of scope.
>>
>> I'd recommend to create a weak handle to the function you create via
>> GetFunction() instead
>>
>> On Mon, Oct 3, 2016 at 12:27 PM Pavel Medvedev <[email protected]>
>> wrote:
>>
>>> Hi  Theodore,
>>>
>>> In this program, weak_callback never gets called. Anyone know why?
>>>
>>>
>>> There is no isolate->Enter() after Isolate::New(params), and no
>>> context->Enter() after Context::New(isolate). May it be a reason?
>>>
>>>
>>> --
>>> --
>>> v8-users mailing list
>>> [email protected]
>>> http://groups.google.com/group/v8-users
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "v8-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "v8-users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/v8-users/Rshbi2HKYCM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "v8-users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/v8-users/Rshbi2HKYCM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/v8-users/Rshbi2HKYCM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/v8-users/Rshbi2HKYCM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to