releaseSemantics static method
Drops the handle install took, so the framework stops building the semantics tree every frame. Returns whether one was held.
Only ext.dusk.semantics_hold calls this, and only inside an open perf
session: dusk_perf_run's semantics pass measures what the app costs
without the tree, and a handle left released outside that window would
break every snapshot and ref-based action that follows.
Implementation
static bool releaseSemantics() {
final SemanticsHandle? handle = _semanticsHandle;
if (handle == null) return false;
handle.dispose();
_semanticsHandle = null;
_semanticsReleased = true;
return true;
}