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