Feedback and comments on ARM proposal - resend
Neal Gafter
neal at gafter.com
Mon Mar 9 18:02:53 PDT 2009
On Mon, Mar 9, 2009 at 5:21 PM, Joseph D. Darcy <Joe.Darcy at sun.com> wrote:
> Language-based solutions:
>
> * Destructors as in C++: Destructors in C++ rely on objects having
> different "storage classes," that is living on the stack versus the
> heap. Java has a uniform allocation model and adding storage classes
> would be impractical and undesirable.
The destructor model does not require allocating objects on the stack.
A language change along these lines analogous to this ARM proposal
would provide a new modifier on a local variable, and treat the code
from the declaration point to the point where the variable goes out of
scope much the same way as the ARM proposal treats the try block.
More information about the coin-dev
mailing list