DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
434 stars 59 forks source link

Fix custom allocator not keeping track of allocation stats. #257

Closed DelSkayn closed 5 months ago

DelSkayn commented 5 months ago

As @richarddd pointed out, custom allocators in rquickjs don't keep track of allocation size and count which is used by the quickjs GC to determine when to run GC cycles. As a result rquickjs might leak memory when cyclic memory structures are generated.

This PR fixes this issue.

Fixes #251