Skip to content

fix memory leak in WeakMap#1010

Merged
saghul merged 1 commit intoquickjs-ng:masterfrom
deft-ui:fix-weakmap-mem-leak
Apr 4, 2025
Merged

fix memory leak in WeakMap#1010
saghul merged 1 commit intoquickjs-ng:masterfrom
deft-ui:fix-weakmap-mem-leak

Conversation

@kasonyang
Copy link
Copy Markdown
Contributor

JSMapState.record_count did not subtract 1 after a record is removed from WeakMap. It causes the hash table size to be incorrect when a new record is added.

@kasonyang kasonyang mentioned this pull request Apr 4, 2025
@saghul saghul merged commit 6071c55 into quickjs-ng:master Apr 4, 2025
124 checks passed
@bnoordhuis
Copy link
Copy Markdown
Contributor

A regression test in api-test.c that checks memory usage with JS_ComputeMemoryUsage would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants