Proposal: Automatic Resource Management

Neal Gafter neal at
Fri Mar 6 17:36:56 PST 2009

On Fri, Mar 6, 2009 at 4:02 PM, Bob Lee <crazybob at> wrote:
> On Fri, Mar 6, 2009 at 3:19 PM, Neal Gafter <neal at> wrote:
>> If you've already decided which resource-like APIs "count", then you
>> don't need to ask us.
> Did I unfairly discount some APIs? If so, please speak up.

I did, and you quoted me just after asking the question (see below,
for example).  Apparently, because some other use cases are more
problematic, you feel that the ones I brought up are unimportant.
I've certainly run into situations where automatic pairing of resource
acquisition and release for java.util.concurrent locks would have
avoided errors.  I know that supporting resource acquisition and
release for all the different resource APIs that exist (or will exist)
in Java is difficult to do apriori in a language change (which is why
I prefer an API-based solution), but pretending the use cases don't
exist seems dishonest.

>> Personally, I'd like java.util.locks.Lock to be
>> easier to use, though I understand this proposal doesn't solve that.

More information about the coin-dev mailing list