@@ -27,7 +27,7 @@ BABYLONDEVTOOLS.Loader.require('../validation/validation.js')
}
runTest(index, function() {
- BABYLON.Engine.LastCreatedEngine.dispose();
+ dispose();
needInit = true;
});
@@ -322,4 +322,12 @@ function init() {
engine.setDitheringState(false);
+function dispose() {
+ engine.dispose();
+ currentScene = null;
+ engine = null;
+ document.body.removeChild(canvas);
+ canvas = null;
+}
+
init();