From d83d89e882cfee31ba5ee5e9a8219e3b7e1c0efe Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Mon, 20 May 2019 20:23:53 -0300 Subject: [PATCH] csharp: Do some iterations on exit. So we can kinda properly clean up things before shutting down. --- src/bindings/mono/efl_mono/efl_all.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bindings/mono/efl_mono/efl_all.cs b/src/bindings/mono/efl_mono/efl_all.cs index 48a79b5a3a..e1f020746b 100644 --- a/src/bindings/mono/efl_mono/efl_all.cs +++ b/src/bindings/mono/efl_mono/efl_all.cs @@ -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;