Skip to content

2.18.1

Choose a tag to compare

@fuzzie360 fuzzie360 released this 22 Jul 12:33

Bug-fix release: memory leak with dynamic output kernels.

Fixed

  • Memory leak when calling setOutput() on a dynamicOutput kernel (#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>