public static <T extends Closeable> CloseableReference<T> of(
      @PropagatesNullable @Nullable T t, LeakHandler leakHandler) {
    if (t == null) {
      return null;
    } else {
      return of(
          t,
          (ResourceReleaser<T>) DEFAULT_CLOSEABLE_RELEASER,
          leakHandler,
          leakHandler.requiresStacktrace() ? new Throwable() : null);
    }
  }
Constructs a CloseableReference with a custom {@link LeakHandler} that's run if a reference is
not closed when the finalizer is called.

<p>Returns null if the parameter is null.
fbcore/src/main/java/com/facebook/common/references/CloseableReference.java