We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee4e0bf commit d3b1081Copy full SHA for d3b1081
1 file changed
v3/src/gameobjects/tilesprite/TileSprite.js
@@ -103,6 +103,20 @@ var TileSprite = new Class({
103
this.canvasPattern = this.canvasBufferCtx.createPattern(this.canvasBuffer, 'repeat');
104
}
105
this.dirty = false;
106
+ },
107
+
108
+ destroy: function ()
109
+ {
110
+ if (this.renderer)
111
112
+ this.renderer.gl.deleteTexture(this.tileTexture);
113
+ }
114
+ CanvasPool.remove(this.canvasBuffer);
115
+ this.canvasPattern = null;
116
+ this.canvasBufferCtx = null;
117
+ this.canvasBuffer = null;
118
+ this.renderer = null;
119
+ this.visible = false;
120
121
122
});
0 commit comments