code: public void release() {
          if (releaseCallbacks == null) {
              return;
          }
          for (ReleaseCallback callback : releaseCallbacks) {
              try {
                  callback.release();
              } catch (Exception e) {
                  LOGGER.warn(
                          "Exception occured during release callback invocation:",
                          e);
              }
          }
      }
docs: Release all the resources, i.e. invoke {@link ReleaseCallback#release()}
  on each callback. All the callbacks are always invoked, even if one of
  the invocation fails (throws unchecked exception). Callbacks are invoked
  in the order in which they were registered.