Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak in subset demo #36

Closed
dail opened this issue Mar 29, 2021 · 4 comments
Closed

memory leak in subset demo #36

dail opened this issue Mar 29, 2021 · 4 comments

Comments

@dail
Copy link

dail commented Mar 29, 2021

In "https://github.com/harfbuzz/harfbuzzjs/blob/master/subset/test.js", the fontBuffer created by exports.malloc is not destroyed. The memory should be released by call exports.free method.

@yisibl
Copy link
Contributor

yisibl commented Apr 10, 2021

This problem is indeed serious.

@ebraminio
Copy link
Contributor

@papandreou feel free to consider this isn't issue in your codes as the demo was based on yours apparently. If you are destroying whole wasm machine it probably won't matter much yet better to have this also. Thanks!

papandreou added a commit to papandreou/subset-font that referenced this issue Apr 14, 2021
@papandreou
Copy link
Contributor

@ebraminio, thanks for the ping. I'm not destroying the whole wasm machine, and the heap gets reused between calls to the subsetting. Fixed in papandreou/subset-font@1170630

ebraminio added a commit that referenced this issue Apr 14, 2021
No need to create an input set, just add it to the one
input object has.

Related to #36
@ebraminio
Copy link
Contributor

Turned out it one more issue which is fixed by d8d54ad

Went for fixing it in subset-font and found some other issue added on: papandreou/subset-font#2

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

No branches or pull requests

4 participants