summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorThomas Herzog <thomas.herzog@mail.com>2017-07-24 14:37:39 +0200
committerGitHub <noreply@github.com>2017-07-24 14:37:39 +0200
commitd0f1940534de29cd49a79be8ef6054b8dad13d29 (patch)
tree9a8d59b1b97b5aee97183e1caa3cf236c7b551df /modules
parent042bfabd8f11d90daebfe50b615811298701196e (diff)
parenta1a76bbde4334657cab625f5e85b97f1157868db (diff)
Merge pull request #9809 from karroffel/nativescript-doublefree
[NativeScript] fix double free but on exit
Diffstat (limited to 'modules')
-rw-r--r--modules/nativescript/nativescript.cpp36
1 files changed, 1 insertions, 35 deletions
diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp
index 661ae5371d..f993890a62 100644
--- a/modules/nativescript/nativescript.cpp
+++ b/modules/nativescript/nativescript.cpp
@@ -799,7 +799,7 @@ NativeScriptLanguage::NativeScriptLanguage() {
// TODO(karroffel): implement this
NativeScriptLanguage::~NativeScriptLanguage() {
- _unload_stuff();
+ // _unload_stuff(); // NOTE(karroffel): This gets called in ::finish()
for (Map<String, Ref<GDNative> >::Element *L = NSL->library_gdnatives.front(); L; L = L->next()) {
@@ -1011,40 +1011,6 @@ void NativeReloadNode::_notification(int p_what) {
NSL->library_gdnatives.erase(R->get());
}
- /*
- for (Set<NativeLibrary *>::Element *L = libs_to_reload.front(); L; L = L->next()) {
-
- GDNativeLibrary *lib = L->get()->dllib;
-
- lib->_terminate();
- lib->_initialize();
-
- // update placeholders (if any)
-
- Set<GDNativeScript *> scripts;
-
- for (Set<GDNativeScript *>::Element *S = GDNativeScriptLanguage::get_singleton()->script_list.front(); S; S = S->next()) {
-
- if (lib->native_library->scripts.has(S->get()->get_script_name())) {
- GDNativeScript *script = S->get();
- script->script_data = lib->get_script_data(script->get_script_name());
- scripts.insert(script);
- }
- }
-
- for (Set<GDNativeScript *>::Element *S = scripts.front(); S; S = S->next()) {
- GDNativeScript *script = S->get();
- if (script->placeholders.size() == 0)
- continue;
-
- for (Set<PlaceHolderScriptInstance *>::Element *P = script->placeholders.front(); P; P = P->next()) {
- PlaceHolderScriptInstance *p = P->get();
- script->_update_placeholder(p);
- }
- }
- }
- */
-
} break;
default: {
};