chaucer Posted March 18, 2018 Share Posted March 18, 2018 I've recently found something slightly odd when creating a texture from a canvas, I was hoping someone could help me understand what exactly is happening, as well as if theres a solution to the issue. The problem I'm encountering, is that anytime I create a texture from a canvas, and call... canvas.getContext( '2d' ); my ram consumtion seems to go higher than if I don't call the getContext function. This isn't the only issue though, as anytime i try to clear the texture, the ram that the texture consumed doesn't seem to be freed either. Here's a screenshot to show the comparision. In both examples, I've created a blank canvas with the size of 10,000x10,000( just for testing purposes ). The only difference in each example, is that the top screenshot does not call getContext, while the bottom one does. You can see quite a large difference in the amount of ram consumed, as well as that the memory isn't cleared in the bottom one, even after removing it's parent and destroying it. If anyone can provide any insight as to why this is happening or has a solution to the issue, I'd greatly appreciate it. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.