detach method
Detaches the session from its map and frees its graphics objects.
Release every acquired frame first. Pending frame demands finish with
RenderResult.targetNotReady. Once the detach completes, the library no
longer uses your graphics objects, and you can attach another session to
the map. Release the session afterward.
See mln_render_session_detach in the
C API reference.
Errors:
Status.targetLostwhen the session loses its target before the detach runs.
Implementation
Future<void> detach() => _run(
(arena, completion) => raw.mln_render_session_detach(
_handle.raw,
completion,
nativeDiagnostic,
),
);