simon_bg Posted February 18, 2016 Share Posted February 18, 2016 Hi guys! I have this scene where I import different meshes with lots of polygons, like here: http://babylonjs-playground.com/#1OI6LZ#11 You'll see that I'm importing the same mesh repeated times instead of using instances on purpose. So at some moment, I'd like to remove some of these meshes. In the example above, when you click on the skulls, the mesh.dispose() is called. When I track the memory with the Chrome JS Heap timeline tool I can't really see the memory released though when the dispose() function is called. Here the four skulls were loaded and then I clicked on every one of them, so shouldn't there be some drops visible?: Is there something I'm missing? adam and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 19, 2016 Share Posted February 19, 2016 Well done! It was a leak due to action managers. I'll fix it for next commit Pryme8, Wingnut, simon_bg and 1 other 4 Quote Link to comment Share on other sites More sharing options...
simon_bg Posted February 22, 2016 Author Share Posted February 22, 2016 Thanks, David! I made another test though, and I haven't used Action Managers at all this time: http://babylonjs-playground.com/#1OI6LZ#21 Here, I'm loading four meshes into an array, and when I rotate the camera and a mesh is not longer active, I dispose it and also delete it from the array. I get this graphic now, and again, I can't see memory being released: Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 22, 2016 Share Posted February 22, 2016 It works well for me (snapshot1 is on load and snapshot 2 is after disposing the 4 skulls) Quote Link to comment Share on other sites More sharing options...
simon_bg Posted February 22, 2016 Author Share Posted February 22, 2016 Oh, you're right, it works for me too when making the snapshots, I guess I thought it would be visible on the JS Heap tool also. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 23, 2016 Share Posted February 23, 2016 Chrome is perhaps keeping this memory for later use Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.