Christian Mayer wrote:
Am 18.11.2014 um 22:03 schrieb Brendan Eich:
>  Christian Mayer wrote:
>>  What I actually sometimes really miss in JavaScript (having a big C++
>>  background) are destructors.
>>
>>  (I haven't checked if they are in any new version proposal, though)
> > No, as JS has no stack storage class, only we-hope-unobservable GC, no
>  destructors.

I fully understand that something called at GC time won't work - but
that's not a real destructor for me, that would be a sort of
"destroyer"...:)

:-D.

The destructor should IMHO be called when the JS internal ref count gets
to 0, i.e. when the object gets released to the GC to do it's job when
it wants to.

JS does not mandate reference counting, and I know of no competitive engine that uses it.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to