ARM syntax and new keywords

tronicek at tronicek at
Sat Nov 28 00:32:10 PST 2009

Hi John,

how do you want to find out whether the object is accessible at the end of
the block? You want to run the garbage collector at each closing brace?

Zdenek Tronicek
FIT CTU in Prague

John Hendrikx napsal(a):
> Yes, I'm actually a bit surprised that the ARM syntax currently favors
> the try syntax.  Why not simply call a method on any object going out of
> scope if it implements a certain interface?  It would be like finalize,
> except it would have clearly defined semantics making it useful for
> automatically cleaning up your resources (ie, it would be called as soon
> as it goes out of scope).
> Exceptions being thrown from such a close method should in my opinion
> simply be disallowed.  If your auto cleanup block can't do it's thing
> without throwing exceptions, then use something else.
> All this fooling around with annotations, keywords and resource blocks
> when a decent implementation of finalize could do the trick far easier
> seems odd to me.

More information about the coin-dev mailing list