Proposal: Automatic Resource Management

Joshua Bloch jjb at
Wed Mar 4 14:17:33 PST 2009


On Wed, Mar 4, 2009 at 1:45 PM, Mark Mahieu <markmahieu at>wrote:

> In all seriousness, what should the behaviour then be if a class implements
> two or more of these interfaces?  Should all of the 'disposal' methods be
> invoked?

I'd make it a compile-time error to use an automatic resource management
statement if the static type is a subtype of more than one of these

> Putting interfaces aside for a moment, instead of an annotation my instinct
> would have been to reach for a modifier here,

That's a possibility too.


More information about the coin-dev mailing list