acquireRelease method

ZIO<Scope<R>, E, A> acquireRelease(
  1. IO<Unit> release(
    1. A _
    )
)

Request a Scope and add a finalizer from the result of this ZIO to it.

Implementation

ZIO<Scope<R>, E, A> acquireRelease(
  IO<Unit> Function(A _) release,
) =>
    withScope.tapEnv((a, _) => _.addScopeFinalizer(release(a)));