public interface Housekeeper
Modifier and Type | Interface and Description |
---|---|
static interface |
Housekeeper.CleanupRunnable
Cleanup runnable to execute when a reference needs to be cleaned up
|
static interface |
Housekeeper.Ref |
Modifier and Type | Method and Description |
---|---|
<T> Object |
add(T referent,
Housekeeper.CleanupRunnable cleanup)
Associate a cleanup runnable to be run when a referent is only phantom
reference-able.
|
void |
emptyQueue()
Ensures the cleanup queue is emptied immediately
|
void |
remove(Object cleanupKey)
Removes cleanup runnable for the given referent
|
void |
setLogLeakedReferences(boolean value)
Enable/Disable leaked reference logging
|
<T> Object add(T referent, Housekeeper.CleanupRunnable cleanup)
referent
- Reference to trackcleanup
- Runnable to run when referent is phantom-edvoid remove(Object cleanupKey)
cleanupKey
- Key to reference to stop trackingvoid emptyQueue()
void setLogLeakedReferences(boolean value)
Copyright © 2013–2017 impossibl.com. All rights reserved.