On Mon, Nov 30, 2009 at 6:30 PM, Stephan Beal <[email protected]> wrote:
> On Mon, Nov 30, 2009 at 12:17 PM, Abdulla Kamar <[email protected]>
> wrote:
>>
>> I've read the discussion, however there was explicit mention of it in the
>> ChangeLog, hence my inquiry.
>
> Hi, Abdulla!
>
> This is a _sorely_ missing feature in v8. Maybe if you and i keep
> complaining loudly enough about it, they'll eventually give us a way to
> force our destructors to be called.

You can always maintain your own list of objects that need to be
destructed and destruct them when you need it.  BTW, in most GC
languages that is the only reliable way to release resources (compare,
e.g., w/ Java GC guarantees).

Or you could just force GC several times yourself (e.g. invoke
V8::IdleNotification many times, many > 10).

However, please, double check that you do not retain the objects by yourself.

> The fact that v8's performance characteristics are based solely off of
> Chrome's needs is, IMO, philosophically wrong. One specific app should not
> determine the destiny of all applications which link to v8. Believe it or
> not, Chrome is the minority case for v8 - it's used in many, many more
> applications that Chrome, but yet every single one of them suffers with this
> limitation because it is useful for Chrome.

Chrome is one of most important V8 client.  However, I think it's a
very false assumption to think that it's the only client V8 team cares
about: if you could suggest a patch which would help any other client,
I'd surprised if it'd be rejected.  Situation would be more involved
if that'd affect performance of Chrome/v8/SunSpider, but that's the
way it is---those are considered to be major benchmarks that v8 team
tries hard not to regress w/o very good reason (like bugfix, e.g.).

hth and yours,
anton.

>
>>
>> It's something I would think to be important and useful. I also have Lua
>> bindings for my code, and it can guarantee cleanup when I destroy the
>> interpreter's state.
>
> It is not only important, but CRITICAL for certain types of bound objects,
> e.g. database handles which must release resources cleanly. Almost all of
> the classes i've bound so far REQUIRE a destructor call in order for their
> behaviours to be well-defined. e.g. an sqlite3 database handle, a (FILE*)
> handle, etc. i've always got to add lots of extra code to my apps to ensure
> they are cleaned up. Let me reword that - BECAUSE OF CHROME i have to add
> lots of extra code to manage these destructions.
>
> i like Chrome, but i hate that Chrome's needs change the fate of every
> v8-using application out there. And i hope and pray that someday the v8
> developers will recognize this fundamental design flaw and stop coupling v8
> to Chrome's speed requirements. If v8's only consideration is Chrome, then
> it never should have been split out of the Chrome source tree.
>
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
> --
> 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

Reply via email to