StageXL icon indicating copy to clipboard operation
StageXL copied to clipboard

Garbage collector for webgl renderer

Open xvrh opened this issue 8 years ago • 2 comments

Hello Bernhard, Pixi.js has this "texture gargabe collector": https://github.com/pixijs/pixi.js/blob/dev/src/core/renderers/webgl/TextureGarbageCollector.js

It seems to be about disposing texture when there are not in the stage anymore.

I'm thinking that it could be a good idea for TextField or _DisplayObjectCache. If the developer forget to call the "dispose" method after removing them from the Stage would it create a memory leak?

Do you think this can be usefull for StageXL too?

xvrh avatar Feb 01 '17 12:02 xvrh

I need to look at the PixiJS implementation what this actually does. WebGL textures should be garbage collected by the browser if there are no references anymore, but maybe this can be improved by the TextureGarbageCollector. I will take a look at it! Thanks for the suggestion.

bp74 avatar Feb 01 '17 12:02 bp74

I wonder if this is related to https://github.com/bp74/StageXL/issues/257?

mnordine avatar Feb 01 '17 13:02 mnordine