2.18.1
Bug-fix release: memory leak with dynamic output kernels.
Fixed
- Memory leak when calling
setOutput()on adynamicOutputkernel (#841). Every replaced output texture's handle was retained in an internal cache until the kernel was destroyed, so long-running kernels that resize between runs grew process memory without bound (even when the size didn't actually change). Texture deletion now evicts the handle from the cache. Verified with 20k resize+run iterations: RSS stays flat (~108 MB) instead of climbing without bound.
Installing
npm install gpu.js@2.18.1<script src="https://unpkg.com/gpu.js@2.18.1/dist/gpu-browser.min.js"></script>