docs: public void destroyProxy(ClientProxy proxy) {
          ObjectNamespace objectNamespace = new DistributedObjectNamespace(proxy.getServiceName(),
                  proxy.getDistributedObjectName());
          ClientProxyFuture registeredProxyFuture = proxies.remove(objectNamespace);
          ClientProxy registeredProxy = registeredProxyFuture == null ? null : registeredProxyFuture.get();
  
          try {
              if (registeredProxy != null) {
                  try {
                      registeredProxy.destroyLocally();
                  } finally {
                      registeredProxy.destroyRemotely();
                  }
              }
          } finally {
              if (proxy != registeredProxy) {
                  // The given proxy is stale and was already destroyed, but the caller
                  // may have allocated local resources in the context of this stale proxy
                  // instance after it was destroyed, so we have to cleanup it locally one
                  // more time to make sure there are no leaking local resources.
                  proxy.destroyLocally();
              }
          }
      }