yew-wasm-pack-template
yew-wasm-pack-template copied to clipboard
wee_alloc can appear to leak
I recently converted a piece of software from std-web to web-sys and everything went really well at least in super light testing. However, unbeknownst to me, a memory leak crept in and it turns out to happen when I use wee-alloc and have my project configured like I think yew-wasm-pack-template is demonstrating.
If I do the same thing using wasm-pack, I don't see the behavior.
I've created a repository that demos what I'm seeing. My workaround is simply not to use wee-alloc, but this behavior is surprising enough to me that I think it probably makes sense to mention it to somebody. I do, however, feel bad mentioning it here, but I think I'd feel worse mentioning it elsewhere.
Haha, I appreciate you bringing this up, we should definitely figure out why this is happening!
Just experienced this too and, after spending a few hours tracking down the cause, found this related issue: https://github.com/rustwasm/wee_alloc/issues/106
Thanks @finnbear, @CraigMacomber, and anyone else looking into this. It's bitten so many people I feel bad I didn't chase it down a couple of years ago.