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);
  _columnarDecompressNativeFree(
    ffi.Pointer<ffi.Void>.fromAddress(owner.pointerAddress),
  );
}