From 4b5b13452b4af1c42f1b6084351f66af86e9887c Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Fri, 19 Jul 2019 21:42:05 +0200 Subject: [PATCH] remove memory leak --- index.html | 2 +- main.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4b4f532..e650218 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ - WebGL test + WebGL waves diff --git a/main.js b/main.js index 6157288..23a23eb 100644 --- a/main.js +++ b/main.js @@ -160,6 +160,8 @@ async function run() { const vertexCount = 4; gl.drawArrays(gl.TRIANGLE_STRIP, offset, vertexCount); + drawable.free(); + window.requestAnimationFrame(drawMe); }