close

open override fun close()

Closes this ReferenceManager to prevent future acquire acquiring. A reference manager should be closed if the reference to the managed resource should be disposed or the application using the ReferenceManager is shutting down. The managed resource might not be released immediately, if the ReferenceManager user is holding on to a previously acquire acquired reference. The resource will be released once when the last reference is release released. Those references can still be used as if the manager was still active.

Applications should not acquire acquire new references from this manager once this method has been called. acquire Acquiring a resource on a closed ReferenceManager will throw an AlreadyClosedException.

Throws

IOException

if the underlying reader of the current reference could not be closed