public void dispose() {
        if (memoryManager != null) {
            memoryManager.releaseAllByLibrary(this);
        }
        if (cacheManager != null) {
            cacheManager.dispose();
        }
        if (refs != null) {
            refs.clear();
        }
        if (lookupReference2ICCBased != null) {
            lookupReference2ICCBased.clear();
            lookupReference2ICCBased = null;
        }
        if (m_LazyObjectLoader != null) {
            m_LazyObjectLoader.dispose();
        }
    }