Short answer is: v8 does not guarantee that weak ptr callbacks will EVER be called. Yes, this is painful, but even if such a guarantee could be made, there's no way for v8 to know the proper destruction order (important, e.g., for db handles and prepared statements). My tip is: add a destroy() method to your bound classes and clean up manually. try/finally blocks are helpful here.
(sent from a mobile device - please excuse brevity, typos, and top-posting) ----- stephan beal http://wanderinghorse.net On Apr 15, 2013 8:03 PM, "Mike Moening" <[email protected]> wrote: > I’ve been trying to figure out a way to force GC for V8.**** > > ** ** > > Read about and tried the AdjustAmountOfExternalAllocatedMemory() and > IdleNotification() methods.**** > > I tried AdjustAmountOfExternalAllocatedMemory(1024*1024*100); //100 MB > should be enough!**** > > ** ** > > Upon shutdown of my application (and periodically too) **** > > it is crucial that my MakeWeak() IsNearDeath destructor callbacks get > fired to properly cleanup file handles and C++ memory.**** > > ** ** > > How can I do this? At least with spidermonkey JS_GC() you would force it! > **** > > ** ** > > I’m using memory diagnostics tools that report false leaks since GC isn’t > fired…**** > > ** ** > > Mike Moening**** > > ** ** > > *Retail Technology Solutions Inc.* > > 23235 Texas Avenue**** > > Suite 125**** > > Lakeville, MN 55044**** > > direct: 952-461-3770**** > > ** ** > -- -- 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/groups/opt_out.
