|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.Cleaner
public class Cleaner
This class is used to programatically release references to arcobjects.
References are normally released when the Java object is garbage collected. However, there are times when you want to force the release.
Consider the case where your object is a proxy to a RasterDataset that you are editing. The object may not be garbage collected for some time. Until it is, the RasterDataset may hold onto any files it is writing to, and the updates might not get flushed to the file. The files might remain in use and cannot be deleted till references to the object are released.
By explicitly calling release, the RasterDataset will free the resources it was using, and do any required clean-up tasks. At some time later, the Java object will be garbage collected.
Constructor Summary | |
---|---|
Cleaner()
|
Method Summary | |
---|---|
static void |
release(Object anObject)
Releases a specific reference to an arcobject. |
static void |
releaseAll()
Releases all outstanding references to arcobjects. |
static void |
releaseAllInCurrentThread()
Tells the runtime to release all objects used in the current thread since the last 'trackObjectsInCurrentThread' call. |
static void |
trackObjectsInCurrentThread()
Tells the runtime to remember all objects used in the current thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cleaner()
Method Detail |
---|
public static void releaseAll()
public static void trackObjectsInCurrentThread()
Cleaner.releaseAllInCurrentThread()
public static void releaseAllInCurrentThread()
Cleaner.trackObjectsInCurrentThread()
public static void release(Object anObject)
anObject
- the object to be released
IllegalArgumentException
- if the object that is passed is not a reference to an arcobject.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |