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');
  freeFunc(pointerToSource(slots[key]!.$1));
  slots.remove(key);
}