Proposal: Automatic Resource Management

Neal Gafter neal at gafter.com
Sat Mar 7 11:45:25 PST 2009


On Sat, Mar 7, 2009 at 10:40 AM, Joshua Bloch <jjb at google.com> wrote:
> Neal,
> Sorry, I should have defined my terms.  I define a "true resource" as an
> object that can only used once, and then must be disposed of, never to be
> used again.

That's not the usual definition, (see
<http://en.wikipedia.org/wiki/Resource_(computer_science)>), but OK.
This definition would appear to include classes and interfaces such as

java.sql.Statement (close)
java.nio.channels.FileLock (release)
org.ietf.jgss.GSSCredential (dispose)
java.awt.image.VolatileImage (flush)

I think one of these use cases is currently supported by the proposal.



More information about the coin-dev mailing list