Proposal: Automatic Resource Management
    Neal Gafter 
    neal at gafter.com
       
    Tue Sep  1 14:23:24 PDT 2009
    
    
  
That's an excellent point.  Hopefully the proposal will evolve as required.
On Tue, Sep 1, 2009 at 9:30 AM, Sean R. Drucker <
sean.drucker at frameworkplus.com> wrote:
> Automatic Resource Management should also apply to an Iterator<?> that
> implements Disposable<?> and is used in the enhanced for-each.  So, if
> an Iterator is connected to JDBC, once iteration ends, the close method
> is called:
>
>
> for (Row row: database.getIterable()) {
>   ...
> }
>
> So, when the iterator() method is called on database, if it implements
> Disposable<?>, then it should be disposed.
>
> Thanks... Sean
>
>
>
>
    
    
More information about the coin-dev
mailing list