Add some missing Dispose calls, fix some Dispose implementations.
This commit is contained in:
@@ -17,7 +17,7 @@ using OpenRA.Primitives;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public class HardwareCursor : ICursor
|
||||
public sealed class HardwareCursor : ICursor
|
||||
{
|
||||
readonly Dictionary<string, IHardwareCursor[]> hardwareCursors = new Dictionary<string, IHardwareCursor[]>();
|
||||
readonly CursorProvider cursorProvider;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Graphics
|
||||
void Tick();
|
||||
}
|
||||
|
||||
public class SoftwareCursor : ICursor
|
||||
public sealed class SoftwareCursor : ICursor
|
||||
{
|
||||
readonly HardwarePalette palette = new HardwarePalette();
|
||||
readonly Cache<string, PaletteReference> paletteReferences;
|
||||
|
||||
@@ -17,7 +17,7 @@ using SharpFont;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public class SpriteFont
|
||||
public sealed class SpriteFont : IDisposable
|
||||
{
|
||||
static readonly Library Library = new Library();
|
||||
|
||||
@@ -150,6 +150,11 @@ namespace OpenRA.Graphics
|
||||
|
||||
return g;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
face.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
class GlyphInfo
|
||||
|
||||
Reference in New Issue
Block a user