dispose method
Releases the session in any state, and finishes in the background.
Use it from destructors and finalizers, and
RenderSessionHandle.release() elsewhere. It ends the session as a
release does, except that it abandons a session whose frames you hold,
which ends those frames. Keep servicing a session driven by
RenderDriverKind.callerGraphicsThread until
mln_render_session_service_driver_work() no longer accepts it.
See mln_render_session_dispose in the
C API reference.
Implementation
void dispose() => _state.close(
(handle) => raw.mln_render_session_dispose(handle.raw, nativeDiagnostic),
);