void () { super.removeAll(); // dispose all entries IdentityHashMap<K, V> map = new IdentityHashMap<>(myContent); myContent.clear(); // avoid ConcurrentModificationException map.forEach(this::dispose); }