ShukantPal / pixi-essentials

The best goodies for performant, enterprise-level applications built on PixiJS
https://api.pixijs.io
MIT License
275 stars 36 forks source link

cleaning up temporary sprites and textures in GradientFactory #72

Closed hallundbaek closed 1 year ago

hallundbaek commented 1 year ago

I experienced a memory leak due to the temporary sprite not getting destroyed before handing back the renderTexture, I don't believe there is any reason to keep this around? So I just destroyed it, its Texture and its BaseTexture, before handing back the renderTexture, which fixed my memory leak.

Edit: Oh and my editor added a newline at the end of the file, hope that's cool.