abstract class AbstractReferenceCounted extends java.lang.Object implements ReferenceCounted
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicInteger |
referenceCount |
| Constructor and Description |
|---|
AbstractReferenceCounted() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCount()
Gets the current reference count, which starts at 0.
|
void |
release()
Release a reference to this object.
|
ReferenceCounted |
retain()
Retain an additional reference to this object.
|
public int getCount()
ReferenceCountedgetCount in interface ReferenceCountedpublic ReferenceCounted retain()
ReferenceCountedretain in interface ReferenceCountedpublic void release()
ReferenceCountedrelease in interface ReferenceCounted