kylebarron / parquet-wasm

Rust-based WebAssembly bindings to read and write Apache Parquet data
https://kylebarron.dev/parquet-wasm/
Apache License 2.0
481 stars 19 forks source link

`free()` not work for `ParquetFile` and so on #524

Closed simline closed 2 months ago

simline commented 2 months ago

Nodejs v22 parquet-wasm 0.6

global.gc() and xxx.free() nither work: process.memoryUsage() won't decrease

kylebarron commented 2 months ago

This is expected. free() releases memory within the WebAssembly memory space. The WebAssembly memory space is its own ArrayBuffer, separate from the general JavaScript heap. You'd have to delete the entire WebAssembly.Memory object for the JS runtime to clean up that WebAssembly memory.