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 || _disposed) {
return;
}
_disposed = true;
_getFinalizer(sodium).detach(this);
sodium.sodium_free(ptr.cast());
}