summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-26 21:10:44 +0900
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-31 16:15:55 +0900
commita50b97da885b8a20798d8abbde5750ca85cef00d (patch)
tree4b424d15e5ffce8506fc2e2d14daf461fa6975bc
parente8a90513b07348bef27128c66d32f188053585e2 (diff)
downloadefl-a50b97da885b8a20798d8abbde5750ca85cef00d.tar.gz
efl-mono: Make static delegate really static so it is not GC'ed
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index 13be44a159..cc7534b29a 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -37,7 +37,8 @@ struct function_registration_generator
// auto index = index_generator();
if(!as_generator(
- scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
+ scope_tab << scope_tab << "if (" << f.c_name << "_static_delegate == null)\n"
+ << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
escape_keyword(f.name) << ");\n"
).generate(sink, attributes::unused, context))
return false;