Prevent leaking of hardware cursors.

Added the lacking finialization machinery, ensured disposal under exceptional circumstances and also ensure the game calls dispose on old cursors before creating new ones.
This commit is contained in:
RoosterDragon
2015-04-21 20:24:26 +01:00
parent b4fa704fbd
commit c963806dae
2 changed files with 53 additions and 14 deletions

View File

@@ -309,6 +309,9 @@ namespace OpenRA
using (new PerfTimer("LoadMaps"))
ModData.MapCache.LoadMaps();
if (Cursor != null)
Cursor.Dispose();
if (Settings.Graphics.HardwareCursors)
{
try