On Mar 17, 3:31 pm, Erik Corry <[email protected]> wrote:
> unflushed data.  This is unlikely to work in a satisfactory way since
> your non-memory resources will only be cleaned up if the memory system
> of V8 is under pressure.

If we could get *some* form of trigger to explicitly call v8's gc we
could literally eliminate all of the "supplemental GC" we're having to
add for all the wrapped types (this is intrusive not only on the types
but on the apps which use them, which is unacceptable for plugin-based
architectures). Then we could just force a gc at app exit (while v8 is
still alive), going through the weak pointer dtors, and all objects
would be happy (especially since v8 would still be alive and they
wouldn't have to check before doing any JS-related activities during
cleanup). A problem i'm having is getting plugged-in types to clean up
before v8 dies. When they clean up afterwards they can inadvertently
use a Handle (e.g. to clean up an associated resource) and die trying.
If i only had a guaranteed gc trigger, this wouldn't have to happen.

PLEASE PLEASE PLEASE!!!! Exposing that feature would be a GOOD thing
for ALL of us! If apps want to call a gc every 3 seconds, that's their
business, not v8's!

Until then, i'll try creating a bogus context after my main context
goes out of scope, to trigger my dtors. (With the caveat that this
heuristic is not official and may change, as you mention.)

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to