public interface IReferenceCountable
extends java.lang.AutoCloseable
A reference countable object may be shared by multiple clients and will be disposed only after it is released by every owner. Clients which do not own the object must not access it; attempting that will result in unspecified behavior.
Modifier and Type | Method and Description |
---|---|
void |
addRef()
Spawns a new independent ownership of this object.
|
default void |
close()
Alias for
release() . |
void |
release()
Relinquishes an independent ownership of this object.
|
void addRef()
addRef()
must ultimately be
followed by exactly one call to release()
.void release()
close()
default void close()
release()
.close
in interface java.lang.AutoCloseable