void () { final IntList keys = new it.unimi.dsi.fastutil.ints.IntArrayList(count()); int current = myTop; while (current > 0) { if (myCache[current].value != null) { keys.add(myCache[current].key); } current = myCache[current].next; } for (int i = 0; i < keys.size(); ++ i) { remove(keys.getInt(i)); } }