rds1983 / Myra

UI Library for MonoGame, FNA and Stride
MIT License
704 stars 94 forks source link

Fix memory leak #392

Closed bbepis closed 11 months ago

bbepis commented 11 months ago

As mentioned in Discord, RenderContext not disposing the underlying SpriteBatch was causing GPU resources to never be released. This PR implements that using the Dispose pattern so that it can be reclaimed even if not explicitly disposed

Also adds TextInputEXT.TextInput -= OnChar; to remove the permanent reference on the object so that it can eventually be cleaned up by the garbage collector

rds1983 commented 11 months ago

thanks!