Call GC.Collect in a tread which removes audio stuttering when collecting
This commit is contained in:
1 parent
06cc04dc45
commit
414c46371f
2 files changed
+2
-2
No files matched your search
@@ -403,7 +403,7 @@ namespace Vocaluxe.Base
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_Screens[(int)_CurrentScreen].OnClose();
|
_Screens[(int)_CurrentScreen].OnClose();
|
||||||
GC.Collect();
|
System.Threading.Thread t = new System.Threading.Thread(delegate() { GC.Collect(); });
|
||||||
_CurrentScreen = _NextScreen;
|
_CurrentScreen = _NextScreen;
|
||||||
_NextScreen = EScreens.ScreenNull;
|
_NextScreen = EScreens.ScreenNull;
|
||||||
if(CBackgroundMusic.Playing)
|
if(CBackgroundMusic.Playing)
|
||||||
|
|||||||
@@ -1061,7 +1061,7 @@ namespace Vocaluxe.Base
|
|||||||
CLog.StopBenchmark(2, "Load Cover");
|
CLog.StopBenchmark(2, "Load Cover");
|
||||||
}
|
}
|
||||||
CLog.StopBenchmark(1, "Load Songs ");
|
CLog.StopBenchmark(1, "Load Songs ");
|
||||||
GC.Collect();
|
Thread t = new Thread(delegate() { GC.Collect(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LoadCover(long WaitTime, int NumLoads)
|
public static void LoadCover(long WaitTime, int NumLoads)
|
||||||
|
|||||||
Reference in new issue
Block a user