public interface Disposable
dispose()
method allows any resources held by this
object to be released. The result of calling any other method subsequent to a call to
this method is undefined.
Closeable
Disposeable
and Closeable
interfaces. While very similar, those two interfaces serve slightly different purposes.
The Closeable
interface closes a stream or a connection, but some classes can be
reused with a different stream. For example an ImageReader
can be
instantiated once and reused many time for reading different image streams of the same
format. However once an object has been disposed, it can not be used anymore.Graphics.dispose()
,
ImageReader.dispose()
,
ImageWriter.dispose()
Defined in the sis-utility
module
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Allows any resources held by this object to be released.
|
Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.