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/ > 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.
