|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gl4java.utils.DirectBufferCleanup
Provides a cleanup mechanism for direct buffers instantiated via
the JNI entry point NewDirectByteBuffer
. A direct
buffer can be registered with a DirectBufferCleanup. When
that buffer is reclaimed by the garbage collector, the callback
associated with that DirectBufferCleanup is called on the address
the direct buffer was associated with.
Inner Class Summary | |
static interface |
DirectBufferCleanup.Callback
|
Constructor Summary | |
DirectBufferCleanup(DirectBufferCleanup.Callback cb)
|
Method Summary | |
void |
register(gl4java.utils.Buffer buf)
Registers the given buffer (which must be a direct buffer) for later cleanup when it is reclaimed by the garbage collector. |
void |
start()
The DirectBufferCleanup contains an internal thread which is started automatically upon construction. |
void |
stop()
Stops the internal thread of this DirectBufferCleanup. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DirectBufferCleanup(DirectBufferCleanup.Callback cb)
Method Detail |
public void start()
stop()
method.public void stop()
public void register(gl4java.utils.Buffer buf) throws java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |