Most significantly: "Finalizers are run based on garbage collection, which is generally based on managed memory pressure – they are not run in case of other resource scarcity, and thus are not suited for managing other scarce resources."
Thanks for the clarification. Allthough: When telling v8 how much external resources are allocated with Isolate::AdjustAmountOfExternalAllocatedMemory(+-some), it knows when memory boundaries may be reached and can run callbacks when still enough memory is free? On Friday, 31 October 2014 16:00:53 UTC+1, Andreas Rossberg wrote: > > On 31 October 2014 15:15, Sebastian Herrlinger <[email protected] > <javascript:>> wrote: > > So, manual reference counting and cleanup in js land? What is the > technical > > barrier for a GC to invoke a callback on destruction of an object that > has > > one attached? > > See here: http://en.wikipedia.org/wiki/Finalizer#Problems > > /Andreas > > > > On Friday, 31 October 2014 09:46:16 UTC+1, Andreas Rossberg wrote: > >> On 31 October 2014 08:15, Sebastian Herrlinger <[email protected]> > wrote: > >> > Did not get to the source of it yet, but multiple sources seem to > >> > suggest > >> > that a persistent.setWeak() callback may not be called at all. > >> > So what is the way to go in cleaning up? > >> > >> Building suitable domain-specific abstractions or protocols for it. > >> There is no better way, it's as simple as that. Piggybacking GC > >> usually is an inadequate solution, no matter how strong the > >> finalisation guarantees. > >> > >> /Andreas > > > > -- > > -- > > v8-users mailing list > > [email protected] <javascript:> > > 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] <javascript:>. > > 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.
