Class SoBaseContextCache

  • All Implemented Interfaces:
    SafeDisposable
    Direct Known Subclasses:
    SoCache

    public class SoBaseContextCache
    extends Inventor
    implements SafeDisposable
    Base context dependent cache management class. A helper base class used to store context dependent cache objects.
    • Method Detail

      • setContextDependent

        public void setContextDependent()
        Calls setContextDependent((boolean)true).
      • dispose

        public boolean dispose()
        Description copied from class: Inventor
        Explicitly 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:
        dispose in interface SafeDisposable
        Overrides:
        dispose in class Inventor
        Returns:
        true if this object native resources were successfully disposed; false if 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).
      • release

        public void release​(SoDeviceContextSharedGroup name_8343)
        This function is called when a context has been requested to delete the context through the SoDeviceContext.dispose() method. As some object might be still attached, it triggers all attached object release() method to ask them to detach (and then get it refcount to zero).
      • setContextDependent

        public void setContextDependent​(boolean flag)
        Object is considered not context dependent as long as SoDeviceContext was 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).