chicagobob123 Posted February 23, 2018 Share Posted February 23, 2018 How do you free the memory from a diffuseTexture image? I heard there is a dispose is there? Loaded a texture with an image. like this. plane.material.diffuseTexture = new BABYLON.Texture("grnd.png", scene, false, false, null, function() { }); To free the texture memory do you just do this? plane.material.diffuseTexture.dispose() ? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted February 23, 2018 Share Posted February 23, 2018 http://www.babylonjs-playground.com/#29NWPQ chicagobob123 1 Quote Link to comment Share on other sites More sharing options...
chicagobob123 Posted February 23, 2018 Author Share Posted February 23, 2018 When you run it a second time you get Line 14:3681 - Cannot read property 'dispose' of undefined Any ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2018 Share Posted February 26, 2018 Correct version: http://www.babylonjs-playground.com/#29NWPQ#2 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.