Code example for ReferenceQueue

0
this.useCache = useCache;
        if(useCache)
        { 
            modelCache = new IdentityHashMap();
            refQueue = new ReferenceQueue();
        } 
        else 
        { 
            modelCache = null;
            refQueue = null;
        } 
    } 
 
    /** 
     * @since 2.3.21 
     */ 
    public synchronized boolean getUseCache() { 
        return useCache;
    }