summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-04-15 14:09:49 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-04-15 15:24:29 -0300
commitd775b58a630d6d0fd2ac2176df91bc1142a5276f (patch)
tree38895770f372109df25e6ea64036f1a9cfbd2daf /src/bin
parent7a552024995861e44c301ea8bd7751895e4f8ceb (diff)
csharp: Fix free_cb calling under dotnet.
Summary: dotnet's GC seems to be more agressive, showing some issues that usually do not appear when running under Mono's. This commit uses for free_cb's the same scheme we already use for regular Eo refs, using a GC handle to keep the cleaning callback alive. Reviewers: vitor.sousa, felipealmeida, woohyun Reviewed By: vitor.sousa Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8593
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_pointer.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_pointer.hh b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
index e243ca744c..f724d8029e 100644
--- a/src/bin/eolian_mono/eolian/mono/function_pointer.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
@@ -84,7 +84,7 @@ struct function_pointer {
84 << scope_tab << scope_tab << scope_tab << "}\n" 84 << scope_tab << scope_tab << scope_tab << "}\n"
85 << scope_tab << scope_tab << scope_tab << "else\n" 85 << scope_tab << scope_tab << scope_tab << "else\n"
86 << scope_tab << scope_tab << scope_tab << "{\n" 86 << scope_tab << scope_tab << scope_tab << "{\n"
87 << scope_tab << scope_tab << scope_tab << scope_tab << "Efl.Eo.Globals.efl_mono_thread_safe_free_cb_exec(this._cb_free_cb, this._cb_data);\n" 87 << scope_tab << scope_tab << scope_tab << scope_tab << "Efl.Eo.Globals.ThreadSafeFreeCbExec(this._cb_free_cb, this._cb_data);\n"
88 << scope_tab << scope_tab << scope_tab << "}\n" 88 << scope_tab << scope_tab << scope_tab << "}\n"
89 << scope_tab << scope_tab << scope_tab << "this._cb_free_cb = null;\n" 89 << scope_tab << scope_tab << scope_tab << "this._cb_free_cb = null;\n"
90 << scope_tab << scope_tab << scope_tab << "this._cb_data = IntPtr.Zero;\n" 90 << scope_tab << scope_tab << scope_tab << "this._cb_data = IntPtr.Zero;\n"
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 236cc69759..329a1c297f 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -628,12 +628,12 @@ struct klass
628 << scope_tab << scope_tab << scope_tab << "else\n" 628 << scope_tab << scope_tab << scope_tab << "else\n"
629 << scope_tab << scope_tab << scope_tab << "{\n" 629 << scope_tab << scope_tab << scope_tab << "{\n"
630 630
631 << scope_tab << scope_tab << scope_tab << scope_tab << "Monitor.Enter(Efl.Eo.Config.InitLock);\n" 631 << scope_tab << scope_tab << scope_tab << scope_tab << "Monitor.Enter(Efl.All.InitLock);\n"
632 << scope_tab << scope_tab << scope_tab << scope_tab << "if (Efl.Eo.Config.Initialized)\n" 632 << scope_tab << scope_tab << scope_tab << scope_tab << "if (Efl.All.MainLoopInitialized)\n"
633 << scope_tab << scope_tab << scope_tab << scope_tab << "{\n" 633 << scope_tab << scope_tab << scope_tab << scope_tab << "{\n"
634 << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);\n" 634 << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);\n"
635 << scope_tab << scope_tab << scope_tab << scope_tab << "}\n\n" 635 << scope_tab << scope_tab << scope_tab << scope_tab << "}\n\n"
636 << scope_tab << scope_tab << scope_tab << scope_tab << "Monitor.Exit(Efl.Eo.Config.InitLock);\n" 636 << scope_tab << scope_tab << scope_tab << scope_tab << "Monitor.Exit(Efl.All.InitLock);\n"
637 << scope_tab << scope_tab << scope_tab << "}\n" 637 << scope_tab << scope_tab << scope_tab << "}\n"
638 << scope_tab << scope_tab << "}\n" 638 << scope_tab << scope_tab << "}\n"
639 << scope_tab << "}\n\n" 639 << scope_tab << "}\n\n"