public class

Disposer

extends Object
implements Runnable
java.lang.Object
   ↳ sun.java2d.Disposer

Class Overview

This class is used for registering and disposing the native data associated with java objects. The object can register itself by calling one of the addRecord methods and providing either the pointer to the native disposal method or a descendant of the DisposerRecord class with overridden dispose() method. When the object becomes unreachable, the dispose() method of the associated DisposerRecord object will be called.

See Also

Summary

Constants
int PHANTOM
int WEAK
Fields
public static int refType
Public Constructors
Disposer()
Public Methods
static void addObjectRecord(Object obj, DisposerRecord rec)
static void addRecord(Object target, DisposerRecord rec)
Registers the object and the native data for later disposal.
static void addRecord(Object target, long disposeMethod, long pData)
Registers the object and the native data for later disposal.
static void addReference(Reference ref, DisposerRecord rec)
static ReferenceQueue getQueue()
void run()
When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Runnable

Constants

public static final int PHANTOM

Constant Value: 1 (0x00000001)

public static final int WEAK

Constant Value: 0 (0x00000000)

Fields

public static int refType

Public Constructors

public Disposer ()

Public Methods

public static void addObjectRecord (Object obj, DisposerRecord rec)

public static void addRecord (Object target, DisposerRecord rec)

Registers the object and the native data for later disposal.

Parameters
target Object to be registered
rec the associated DisposerRecord object
See Also

public static void addRecord (Object target, long disposeMethod, long pData)

Registers the object and the native data for later disposal.

Parameters
target Object to be registered
disposeMethod pointer to the native disposal method
pData pointer to the data to be passed to the native disposal method

public static void addReference (Reference ref, DisposerRecord rec)

public static ReferenceQueue getQueue ()

public void run ()

When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.

The general contract of the method run is that it may take any action whatsoever.