Variable finalizationRegistryConst

finalizationRegistry: FinalizationRegistry<{ freeFunc: any; ptr: any }> = ...

A FinalizationRegistry instance for managing the cleanup of native WASM resources.

This registry automatically invokes the provided freeFunc to release native resources associated with a given ptr when the corresponding JavaScript object is garbage collected.

It ensures that the memory allocated in the WASM module is properly released to prevent memory leaks.