Proposal: Automatic Resource Management
Joshua Bloch
jjb at google.com
Wed Mar 4 14:17:33 PST 2009
Mark,
On Wed, Mar 4, 2009 at 1:45 PM, Mark Mahieu <markmahieu at googlemail.com>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
interfaces.
>
> 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.
Josh
More information about the coin-dev
mailing list