ソースを参照

Merge pull request #274 from kresimirfijacko/fix-memory-leaks

Dominic Szablewski 6 年 前
コミット
1f9b67964a
No account linked to committer's email
共有1 個のファイルを変更した3 個の追加0 個の削除を含む
  1. 3 0
      src/webgl.js

+ 3 - 0
src/webgl.js ファイルの表示

@@ -73,6 +73,9 @@ WebGLRenderer.prototype.destroy = function() {
73 73
 	gl.deleteProgram(this.loadingProgram);
74 74
 
75 75
 	gl.deleteBuffer(this.vertexBuffer);
76
+
77
+	gl.getExtension('WEBGL_lose_context').loseContext();
78
+	this.canvas.remove();
76 79
 };
77 80
 
78 81
 WebGLRenderer.prototype.resize = function(width, height) {