Free method

void Free(
  1. String key
)

Frees the native memory owned by slot key and removes it from the table.

Throws if key has not been allocated.

Implementation

void Free(String key) {
  if (!_Slots.containsKey(key)) {
    throw StateError('[FREE] Cannot free unallocated slot $key');
  }
  calloc.free(_Slots[key]!.$1);
  _Slots.remove(key);
}