releaseColumnarDecompressZeroCopyViewForTest function

  1. @visibleForTesting
void releaseColumnarDecompressZeroCopyViewForTest(
  1. Uint8List view
)

Detaches the zero-copy finalizer and frees native memory (tests only).

Implementation

@visibleForTesting
void releaseColumnarDecompressZeroCopyViewForTest(Uint8List view) {
  final owner = _decompressZeroCopyOwners[view];
  if (owner is! _DecompressZeroCopyOwner || _decompressFinalizer == null) {
    return;
  }
  _decompressFinalizer!.detach(owner);
  _decompressZeroCopyOwners[view] = null;
  _bindings!.odbc_columnar_decompress_free(
    ffi.Pointer<ffi.Uint8>.fromAddress(owner.pointerAddress),
    0,
    0,
  );
}