dispose method

void dispose()

Frees the native world now. Using it after this throws.

Implementation

void dispose() {
  if (_world == nullptr) return;
  _finalizer.detach(this);
  fp_world_free(_world);
  _world = nullptr;
  // The scratch stays until this is collected (OwnedMemory), so a call
  // made after this throws before it can harm anything.
}