public interface Disposable
Disposableis an object data that can be disposed once it is not needed anymore. Similar to
Closeable.close()this method is invoked to release resources that the object is holding but there is an important difference. After a
Closeableis closed it can typically be reused. For example, a file can be read later after it is closed. However,
disposeindicated that the resource would never be used again; so, if there is a file associated with the object the file could be deleted or overwritten as needed by other tasks.
Closeable.close()or some other method will be more appropriate.
Copyright © 2010-2016 Stardog Union. All Rights Reserved.