Package com.openinventor.inventor.caches
Class SoBaseContextCache
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.caches.SoBaseContextCache
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoCache
Base context dependent cache management class.
A helper base class used to store context dependent cache objects.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Method Summary
Modifier and TypeMethodDescriptionbooleandispose()Explicitly call this method to force object to dispose its unmanaged resources.booleanreturn current context dependency state.booleanReturns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()on the object.voidrelease(SoDeviceContextSharedGroup name_8343) This function is called when a context has been requested to delete the context through the SoDeviceContext.dispose() method.voidCalls setContextDependent((boolean)true).voidsetContextDependent(boolean flag) Object is considered not context dependent as long asSoDeviceContextwas not ref by this object.Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Method Details
-
setContextDependent
public void setContextDependent()Calls setContextDependent((boolean)true). -
isDisposable
public boolean isDisposable()Description copied from interface:SafeDisposableReturns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()on the object.- Specified by:
isDisposablein interfaceSafeDisposable- Returns:
trueif the object can be disposed in a safe manner
-
dispose
public boolean dispose()Description copied from class:InventorExplicitly call this method to force object to dispose its unmanaged resources. The object may not be reused in the application code after this call.- Specified by:
disposein interfaceSafeDisposable- Overrides:
disposein classInventor- Returns:
trueif this object native resources were successfully disposed;falseif it was already disposed or no native resources has been registered for this object.
-
isContextDependent
public boolean isContextDependent()return current context dependency state. (by default all caches are context dependent). -
setContextDependent
public void setContextDependent(boolean flag) Object is considered not context dependent as long asSoDeviceContextwas not ref by this object. Once at least one device is ref then it calls this function to enbale later check checks deleting this object. see (SoDeviceContext.checkRefIssue call in destructor).
-