public long clear() {
    long result;
    synchronized (this) {
      result = topAddr;
      if (result != 0L) {
        topAddr = 0L;
      }
      size = 0;
    }
    return result;
  }
Removes all the addresses from this stack and returns the top address. The caller owns all the
addresses after this call.
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapStoredObjectAddressStack.java