private void processQueue() {
    while (true) {
      MyReference<?> ref = (MyReference<?>)myQueue.poll();
      if (ref == null) {
        return;
      }
      int key = ref.key;
      myMap.remove(key);
    }
  }
private void processQueue()