diff --git a/21g30t1e75.js b/21g30t1e75.js index bf42a47..1b62f77 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -244,7 +244,10 @@ GameLib.CustomCode.prototype.createFood = function(delta) { ) if (this.food.length >= GameLib.CustomCode.MAX_FOOD_ITEMS) { - this.food.shift(); + var deleteme = this.food.shift(); + deleteme.mesh.geometry = null; + deleteme.mesh.materials = null; + deleteme.mesh.remove(); } this.rebuildGrid();