private void processQueue() {
    while (true) {
      //noinspection unchecked
      MyReference<K> ref = (MyReference<K>)myQueue.poll();
      if (ref == null) {
        return;
      }
      myMap.removeInt(ref);
    }
  }
private void processQueue()