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:
@@ -309,6 +309,9 @@ namespace OpenRA
|
||||
using (new PerfTimer("LoadMaps"))
|
||||
ModData.MapCache.LoadMaps();
|
||||
|
||||
if (Cursor != null)
|
||||
Cursor.Dispose();
|
||||
|
||||
if (Settings.Graphics.HardwareCursors)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user