added GC.Collect()
This commit is contained in:
1 parent
0e8e61905c
commit
ca7c4e8bf8
3 files changed
+15
No files matched your search
@@ -403,6 +403,7 @@ namespace Vocaluxe.Base
|
||||
else
|
||||
{
|
||||
_Screens[(int)_CurrentScreen].OnClose();
|
||||
GC.Collect();
|
||||
_CurrentScreen = _NextScreen;
|
||||
_NextScreen = EScreens.ScreenNull;
|
||||
if(CBackgroundMusic.Playing)
|
||||
@@ -786,6 +787,18 @@ namespace Vocaluxe.Base
|
||||
dy += rect.Height;
|
||||
}
|
||||
|
||||
if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL1)
|
||||
{
|
||||
long memory = GC.GetTotalMemory(false);
|
||||
txt = (memory / 1000000L).ToString(CLanguage.Translate("TR_DEBUG_MEMORY") + ": 00000 MB");
|
||||
|
||||
RectangleF rect = new RectangleF(CSettings.iRenderW - CFonts.GetTextWidth(txt), dy, CFonts.GetTextWidth(txt), CFonts.GetTextHeight(txt));
|
||||
|
||||
CDraw.DrawColor(Gray, new SRectF(rect.X, rect.Top, rect.Width, rect.Height, CSettings.zNear));
|
||||
CFonts.DrawText(txt, rect.X, rect.Y, CSettings.zNear);
|
||||
dy += rect.Height;
|
||||
}
|
||||
|
||||
if (CConfig.DebugLevel >= EDebugLevel.TR_CONFIG_LEVEL2)
|
||||
{
|
||||
txt = CSound.RecordGetToneAbs(0).ToString(CLanguage.Translate("TR_DEBUG_TONE_ABS") + " P1: 00");
|
||||
|
||||
@@ -1055,6 +1055,7 @@ namespace Vocaluxe.Base
|
||||
CLog.StopBenchmark(2, "Load Cover");
|
||||
}
|
||||
CLog.StopBenchmark(1, "Load Songs ");
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
public static void LoadCover(long WaitTime, int NumLoads)
|
||||
|
||||
@@ -569,6 +569,7 @@ namespace Vocaluxe.Screens
|
||||
Texts[htTexts(TextSongName)].Text = String.Empty;
|
||||
Texts[htTexts(TextDuetName1)].Text = String.Empty;
|
||||
Texts[htTexts(TextDuetName2)].Text = String.Empty;
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void LoadNextSong()
|
||||
|
||||
Reference in new issue
Block a user