close method
void
close()
Deterministic cleanup.
Implementation
void close() {
if (_closed) return;
_closed = true;
// prevent finalizer running later
_finalizer.detach(this);
final r = _res!;
_res = null;
r.free();
}