public interface ReferenceCounted
Modifier and Type | Method and Description |
---|---|
long |
refCount() |
void |
release()
release a resource
|
static void |
release(Object o)
release a reference counted object
|
static void |
releaseAll(List<WeakReference<ReferenceCounted>> refCounts) |
void |
reserve()
reserve a resource
|
boolean |
tryReserve() |
static void releaseAll(@NotNull List<WeakReference<ReferenceCounted>> refCounts)
static void release(Object o)
o
- to release if ReferenceCountedvoid reserve() throws IllegalStateException
IllegalStateException
- if the resource has already been freed.void release() throws IllegalStateException
IllegalStateException
- if the resource has already been freed.long refCount()
boolean tryReserve()
Copyright © 2019. All rights reserved.