free method

  1. @override
void free()
override

Frees the underlying allocation. Only call this if you actually own it.

Implementation

@override
void free() {
  if (_ptr == nullptr) return;
  MemoryDebug.checkPointer(this, 'free');
  isFreed = true;
  ffi.malloc.free(_ptr);
}