You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DynamicTexture constructor leaks a WebGL texture on every create/destroy cycle (4.2.1) #7379
In WebGL mode, creating and removing a DynamicTexture leaves one WebGL texture wrapper retained in renderer.glTextureWrappers.
The DynamicTexture constructor allocates a texture through the base Texture/TextureSource constructor, then replaces frame.source.glTexture with this.drawingContext.texture without disposing the original wrapper.
Removing the DynamicTexture destroys the replacement, but the original remains registered with the renderer. In an
isolated reproduction, the original WebGL texture also remains valid according to gl.isTexture().
Expected: after each create/remove cycle, the wrapper count returns to its baseline.
Actual: the retained wrapper count increases by one per cycle.
Related history: #6669 reports a DynamicTexture create/destroy memory leak in Phaser 3.70. This report concerns the
DrawingContext replacement path in 4.2.1; I have not established whether it shares the same underlying cause.
Activity