com.moesol.bindings
Class NativeLeakDetectionThread
java.lang.Object
java.lang.Thread
com.moesol.bindings.NativeLeakDetectionThread
- All Implemented Interfaces:
- Runnable
public class NativeLeakDetectionThread
- extends Thread
This singleton thread checks for native resource leaks.
Use getQ to get a RefenceQueue suitable for
the PhantomReference contructor. Derive a class
from PhantomRefernce that implements the NativeResourceChecker
interface.
When the referent become phantomly reachable
NativeResourceChecker.check is called.
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
instance
public static NativeLeakDetectionThread instance()
- Returns:
- the leak detection thread.
run
public void run()
- Thread entry point
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
stopRunning
public void stopRunning()
- Stop the leak detection thread
getQ
public ReferenceQueue getQ()
- Returns:
- get the reference Q
Copyright © 2004 Moebius Solutions, Inc. All Rights Reserved.