isClosed property
bool
get
isClosed
Whether this session has been closed.
Returns true after close has been called; safe to call any number of times post-close (never dereferences the freed native handle).
Implementation
bool get isClosed {
// Short-circuit BEFORE any loan/deref: close() frees the native handle,
// so the Dart-side _closed flag is the only safe post-close source.
if (_closed) return true;
final loanedSession = bindings.zd_session_loan(_ptr.cast());
return bindings.zd_session_is_closed(loanedSession) != 0;
}