csharp: Do some iterations on exit.

So we can kinda properly clean up things before shutting down.
This commit is contained in:
Lauro Moura 2019-05-20 20:23:53 -03:00 committed by Vitor Sousa
parent fcf5f1d2e2
commit d83d89e882
1 changed files with 6 additions and 2 deletions

View File

@ -72,8 +72,12 @@ public static class All
{
// Try to cleanup everything before actually shutting down.
Eina.Log.Debug("Calling GC before shutdown");
System.GC.Collect();
System.GC.WaitForPendingFinalizers();
for (int i = 0; i < 3; i++)
{
System.GC.Collect();
System.GC.WaitForPendingFinalizers();
Efl.App.AppMain.Iterate();
}
Monitor.Enter(InitLock);
MainLoopInitialized = false;