I too wish there was a way to force garbage collection. To force destruction of certain objects on program termination, I've had to keep a list of those objects that are resources that need to be explicitly closed.
In addition to explicitly destroying these resources, I also supply v8 with (sometimes fudged) numbers showing the amount of space actually used by each object (the more memory v8 thinks is being used, the more often it garbage collects): V8::AdjustAmountOfExternalAllocatedMemory(size * 1000); V8::AdjustAmountOfExternalAllocatedMemory(size * 1000); Alex On Mar 5, 2009, at 1:48 PM, Ondrej Zara wrote: > I would really appreciate some kind of moving forward in this issue. > My primary goal is to automatically close DB connections and this is > somewhat pressing in my scenario. However, it looks like there is no > generic and straightforward way to force GC. Alex Iskander, TPSi --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
