|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectau.com.swz.swttocom.swt.STCResourceManager
public class STCResourceManager
The SWTtoCOM Resource Manager is resposible for releasing held COM interface references. When an automation object is finalised by the Java garbage collector the automation instance it references is registered with this class. The finalise method itself cannot be used to release references since it is often run in a background thread and the instances must be released by the SWT UI thread. This class registeres itself on a SWT timer and then periodically releases the COM interfaces using the SWT UI thread.
| Method Summary | |
|---|---|
void |
AddObj(IDisposeableResource obj)
Adds a new interface reference to the list of references that will be release at the next interval. |
static STCResourceManager |
getInstance()
Returns the singleton instance of this manager. |
static int |
getReleaseInterval()
Returns the current release interval. |
void |
run()
Called by SWT to release all held COM interface references. |
static void |
setReleaseInterval(int releaseInterval)
Sets the current release interval. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static STCResourceManager getInstance()
public void run()
run in interface java.lang.Runnablepublic void AddObj(IDisposeableResource obj)
obj - the reference to be released.public static int getReleaseInterval()
public static void setReleaseInterval(int releaseInterval)
releaseInterval - the new release interval.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||