src/main/java/org/ehcache/sizeof/util/WeakIdentityConcurrentMap.java
public V remove(K key) {
        cleanUp();
        return map.remove(new IdentityWeakReference<>(key, queue));
    }
public V remove(K key) {
        cleanUp();
        return map.remove(new IdentityWeakReference<>(key, queue));
    }
Remove from the underlying

@param key key whose mapping is to be removed from the map
@return the previous value associated with <tt>key</tt>, or
<tt>null</tt> if there was no mapping for <tt>key</tt>.