public ByteBufferSharing open() throws IOException {
    lock.lock();
    addReferenceAfterLock();
    return sharing;
  }
This method is for use only by the owner of the shared resource. It's used for handing out
references to the shared resource. So it does reference counting and also acquires a lock.

Resource owners call this method as the last thing before returning a reference to the caller.
That caller binds that reference to a variable in a try-with-resources statement and relies on
the AutoCloseable protocol to invoke {@link AutoCloseable#close()} on the object at
the end of the block.
geode-core/src/main/java/org/apache/geode/internal/net/ByteBufferVendor.java