Also, here's the somewhat generalized code I use for doing this in my
integration library:
https://github.com/xaxxon/v8toolkit/blob/master/include/v8toolkit.h#L972
On Wed, Oct 5, 2016 at 8:36 PM, Zac Hansen wrote:
> Good news is, this program calls the callback. Bad news it
Good news is, this program calls the callback. Bad news it crashes, but I
think it demonstrates the general idea.
I believe the problem with your program is that your global with the weak
callback goes away too early. In my program below you can see I'm
allocating the global on the heap (and
Actually, that didn't work. Any other ideas? Any techniques for debugging
GC (like getting information on where an object is referenced?)
--
--
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to
It's in the v8::mother experimental namespace :-)
On Wednesday, October 5, 2016, wrote:
> Why didn't I think of that?
>
> Put a(mother) handle scope inside the for loop
>>
>
> Also, autocorrect failure ^
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
>
Why didn't I think of that?
Put a(mother) handle scope inside the for loop
>
Also, autocorrect failure ^
--
--
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
The loop is inside the handle scope if I'm reading to correctly so the
handle scope keeps a reference to everything meaning it can't be gc
On Wednesday, October 5, 2016, wrote:
> Thanks for all your feedback. I tried attaching the weak callback to the
> function instead of
Thanks for all your feedback. I tried attaching the weak callback to the
function instead of the callback data, and I tried a tight loop
with AdjustAmountOfExternalAllocatedMemory. But the weak callback still
isn't getting called. Here's the updated main function:
int main() {
the function template won't ever get gc'd after you've instantiated it once.
On Wed, Oct 5, 2016 at 12:56 AM Zac Hansen wrote:
> Put your inner block in a tight loop and throw in a
>
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(100)
in there too and see what happens.
On Tue, Oct 4, 2016 at 3:48 PM, Theodore Dubois
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 wrote:
>
> The way I read it is
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
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 wrote:
>
> v8 has an per-isolate cache of function templates. As the string is
> referenced by the function template, it
http://v8.paulfryzel.com/docs/master/classv8_1_1_persistent_base.html#aebb8a2c97e219102f613ff3749c956f6
Specifically:
NOTE: There is no guarantee as to *when* or even *if* the callback is
> invoked. The invocation is performed solely on a best effort basis. As
> always, GC-based finalization
13 matches
Mail list logo