On Mon, Mar 5, 2018 at 3:44 PM, A.M. <cis74...@gmail.com> wrote: > Thanks again for your insights, Ben. I ended up tracking all weak handles, > as well as all allocations, so combining weak handle callbacks with walking > all allocations after the isolate has been disposed of seems to cover all > memory allocations without any interference from v8 background threads. > > Strange, though, that the v8 doesn't provide a way to walk all live memory > in an isolate after all contexts are gone or some similar stage. Sounds like > a straightforward way to manage resources. .
It exists (and I should have mentioned that in my previous email, sorry about that.) Maybe you found them already: `Isolate::VisitHandlesWithClassIds()` and `Isolate::VisitWeakHandles()` - do what they say on the tin but note that weak handles need to have a class id too. It can be hard to determine when all contexts are really dead - the microtask queue (what drives promises) can keep them alive beyond a simple return from JS land - but that's probably not a problem for you if you're going to dispose of the isolate anyway. -- -- 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 "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.