Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Deleting native and js objects/variables
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
CodeJunkie  
View profile  
 More options Jun 9 2011, 5:33 pm
From: CodeJunkie <isrne...@gmail.com>
Date: Thu, 9 Jun 2011 14:33:58 -0700 (PDT)
Local: Thurs, Jun 9 2011 5:33 pm
Subject: Re: Deleting native and js objects/variables
In other words, you have to go out of your way to delete C++ objects
which would most likely mean that you would have to have your own
memory management scheme to deal with it. So this means V8 is geared
more towards browsers than for general purpose use and should really
not be used outside the browser verse. I think that more documentation
is needed on the v8 engine to help shed light on the subject. Guess
it's back to Lua. (-_-).

On Jun 9, 10:08 am, Stephan Beal <sgb...@googlemail.com> wrote:

> On Thu, Jun 9, 2011 at 8:52 AM, CodeJunkie <isrne...@gmail.com> wrote:
> > Now X is lost and dangling. The C++ destructor is never called, even
> > at program exit.

> Don't get lured into that false sense of security (as i did). v8 does NOT
> guaranty that GC will EVER be called, including at app exit. It does not do
> a full GC at exit (supposedly as a performance boost when closing tabs in
> Chrome, if my memory serves me correctly).

> That means that when wrapping types which REQUIRE destructor calls for
> proper semantics, you must add functions to those objects which performs
> such cleanup, and call those functions from your JS code. The canonical
> examples are file handles and db connections, which would have a close()
> member (or similar) which cleans up the native object and sets up the object
> state so that future method calls on that object will not step on a
> destructed pointer.

> --
> ----- stephan bealhttp://wanderinghorse.net/home/stephan/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.