dispose method

void dispose()

Disposes the pointer and frees the allocated memory.

Provides sodium_free

See https://libsodium.gitbook.io/doc/memory_management#guarded-heap-allocations

Implementation

void dispose() {
  if (_isView) {
    return;
  }
  _getFinalizer(sodium).detach(this);
  sodium.sodium_free(ptr.cast());
}