4 ms·
On the idea that it's your code, and not your browser, in my samples with Canvas, i've noticed memory is very easy to start "leaking" One thing I found on Stac
by manuscreationis 15y ago
On the idea that it's your code, and not your browser, in my samples with Canvas, i've noticed memory is very easy to start "leaking"
One thing I found on StackOverflow (I cannot find the article again, I apologize... I should've bookmarked it) was that if you're drawing lines and not using the "beginPath" call, you'll get a memory leak. No idea why this would be.
I realized I had exactly that problem in my sample canvas app, and making the change actually reduced my memory overhead. In Opera and Chrome, anyways. Firefox still had wild memory fluctuations, but that didn't surprise me.
Moral of the story: There are probably several things you could tweak to reduce your memory usage, as it does seem that a lot of canvas code out there is memory-abusive.