Proposal: Automatic Resource Management

Neal Gafter neal at
Fri Mar 6 15:19:26 PST 2009

On Fri, Mar 6, 2009 at 1:11 PM, Bob Lee <crazybob at> wrote:
> The "finally" modifier is very clever, but I think we're underestimating its
> Does anyone have real world
> examples where adapting an API to work with Disposable or Resource would be
> so egregious as to justify the complexity inherent in the finally modifier?
> Please limit examples to only those that you would actually want to use with
> this language construct. For example, Lock.unlock() and Process.destroy()
> don't count

If you've already decided which resource-like APIs "count", then you
don't need to ask us.  Personally, I'd like java.util.locks.Lock to be
easier to use, though I understand this proposal doesn't solve that.
We've already discussed sql transactions too.

More information about the coin-dev mailing list