diff --git a/Vocaluxe/Base/Fonts/CFont.cs b/Vocaluxe/Base/Fonts/CFont.cs index fc6004f9..70232953 100644 --- a/Vocaluxe/Base/Fonts/CFont.cs +++ b/Vocaluxe/Base/Fonts/CFont.cs @@ -128,8 +128,8 @@ namespace Vocaluxe.Base.Fonts public void UnloadGlyphs() { - //foreach (CGlyph glyph in _Glyphs.Values) - // glyph.UnloadTexture(); + foreach (CGlyph glyph in _Glyphs.Values) + glyph.UnloadTexture(); _Glyphs.Clear(); } diff --git a/Vocaluxe/Base/Fonts/CFonts.cs b/Vocaluxe/Base/Fonts/CFonts.cs index 99c271a8..067cabd1 100644 --- a/Vocaluxe/Base/Fonts/CFonts.cs +++ b/Vocaluxe/Base/Fonts/CFonts.cs @@ -418,9 +418,6 @@ namespace Vocaluxe.Base.Fonts public static void UnloadThemeFonts(string themeName) { - if (_Fonts.Count == 0) - return; - int index = 0; while (index < _Fonts.Count) { diff --git a/Vocaluxe/Base/Fonts/CGlyph.cs b/Vocaluxe/Base/Fonts/CGlyph.cs index ea0f1e18..a24551fa 100644 --- a/Vocaluxe/Base/Fonts/CGlyph.cs +++ b/Vocaluxe/Base/Fonts/CGlyph.cs @@ -128,7 +128,7 @@ namespace Vocaluxe.Base.Fonts CFonts.Height = oldHeight; } - ~CGlyph() + public void UnloadTexture() { CDraw.RemoveTexture(ref _Texture); } diff --git a/Vocaluxe/Screens/CScreenTest.cs b/Vocaluxe/Screens/CScreenTest.cs index 4a84b29c..d7b3b722 100644 --- a/Vocaluxe/Screens/CScreenTest.cs +++ b/Vocaluxe/Screens/CScreenTest.cs @@ -20,7 +20,6 @@ using System; using System.Windows.Forms; using Vocaluxe.Base; -using Vocaluxe.Base.Fonts; using VocaluxeLib.Menu; namespace Vocaluxe.Screens