public class Disposer
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
private static Disposer |
disposerInstance |
private static java.lang.ref.ReferenceQueue |
queue |
private static java.util.Map<java.lang.Object,java.lang.Runnable> |
records |
| Constructor and Description |
|---|
Disposer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addRecord(java.lang.Object target,
java.lang.Runnable rec)
Registers the object and the data for later disposal.
|
void |
run() |
private static final java.lang.ref.ReferenceQueue queue
private static final java.util.Map<java.lang.Object,java.lang.Runnable> records
private static Disposer disposerInstance
public static void addRecord(java.lang.Object target,
java.lang.Runnable rec)
target - Object to be registeredrec - the associated Runnable objectpublic void run()
run in interface java.lang.Runnable