Package com.complexible.common.base
Interface Disposable
-
- All Known Subinterfaces:
AutoDisposable
- All Known Implementing Classes:
AbstractAutoDisposable
,CancellationManager
,Disposer
public interface Disposable
ADisposable
is an object data that can be disposed once it is not needed anymore. Similar toCloseable.close()
this method is invoked to release resources that the object is holding but there is an important difference. After aCloseable
is closed it can typically be reused. For example, a file can be read later after it is closed. However,dispose
indicated 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.- Author:
- Evren Sirin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dispose()
Dispose the resources held by this object.
-
-
-
Method Detail
-
dispose
void dispose()
Dispose the resources held by this object. Use this function with care since disposed objects cannot be reused again. If the resources (files, pages, etc.) held by this object will be needed again callingCloseable.close()
or some other method will be more appropriate.
-
-