On Thu, May 13, 2010 at 10:37 PM, Anton Muhin <[email protected]> wrote: > Not quite, but pretty much---you might use WeakHandles and provide a > callback which is invoked when object referenced by the handle is only > reachable via weakhandles (usually it's a single weak handle). Now > you can release all the resources and wait while the wrapper itself > gets collected. > > You should be careful not to revive wrapper though. > > Take a look at usage of weak handles in Chromium sources. > > yours, > anton. > > On Thu, May 13, 2010 at 9:38 PM, Seiji Sam Lee <[email protected]> wrote: >> Is it possible? Can I detect the destruction of an object and so liberate >> data into internal pointers (SetPointerInInternalField)? >> >> >> >> For example: if I have a FILE* into an internalField and user not close >> explicity the object (file.close()), and the script finish, where can I >> close the file? >> >> Maybe the response was “free all forgotten by user when the script finish”, >> but it is a dirty solution L >> >> Exists callbacks for GC (I know) but GC don’t show the object to be >> liberated. >> >> >> >> Thanks in advance. >> >> -- >> v8-users mailing list >> [email protected] >> http://groups.google.com/group/v8-users >
-- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
