rds1983 / Myra

UI Library for MonoGame, FNA and Stride
MIT License
742 stars 93 forks source link

Fix memory leak #392

Closed bbepis closed 1 year ago

bbepis commented 1 year 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 1 year ago

thanks!