Mark S. Miller (2015-09-06T17:50:21.000Z)
d at domenic.me (2015-09-15T21:21:57.351Z)
On Sun, Sep 6, 2015 at 10:32 AM, Isiah Meadows <isiahmeadows at gmail.com> wrote: > That's actually the feature I need... > Hi Isiah and Thomas, what "That"? If you mean pre-mortem finalization, like Java's Object.finalize or the cited node callbacks (whose pre-mortem nature is made clear by isNearDeath at https://github.com/TooTallNate/node-weak#boolean-weakisneardeathweakref-ref) I would be very surprised if you actually need it. Could you show a very small but motivating example? I have never run across an example that couldn't be expressed at least as well with post-mortem finalization. I ask for a "very small but motivating example" so that, hopefully, I'll be able to find the time to rewrite it using post-mortem finalization. Note the C++ RAII is an immediate pre-mortem invocation of a destructor at a predictable and deterministic time. The general arguments against gc-driven pre-mortem finalization do not apply. If you just mean some kind of finalization via callback, sure, that's always been part of the strawman.