close method

void close()

Zeroes the APKAM private key this store holds. Idempotent. A later read throws StateError; a later or queued write, flush or update throws AtServerAtKeysWriteException without touching the atServer.

A write already running is not cut off: it finishes, and the key is zeroed right after it. Never waits, so a write that hangs cannot hold a stop; it holds the key in memory until it settles.

Implementation

void close() {
  _closed = true;
  _cache = null;
  if (_pending == 0) _release();
}