Skip to content

Commit

Permalink
Merge pull request phoboslab#274 from kresimirfijacko/fix-memory-leaks
Browse files Browse the repository at this point in the history
Fix memory leaks
  • Loading branch information
phoboslab authored Apr 10, 2019
2 parents afc1f38 + 341a347 commit 1f9b679
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ WebGLRenderer.prototype.destroy = function() {
gl.deleteProgram(this.loadingProgram);

gl.deleteBuffer(this.vertexBuffer);

gl.getExtension('WEBGL_lose_context').loseContext();
this.canvas.remove();
};

WebGLRenderer.prototype.resize = function(width, height) {
Expand Down

0 comments on commit 1f9b679

Please sign in to comment.