Fixup thread-owned lambda bookkeeping on thread exit

This commit is contained in:
Pedro J. Estébanez
2023-11-09 12:38:01 +01:00
parent f3e96a8548
commit 271511726b
4 changed files with 107 additions and 18 deletions

View File

@@ -45,7 +45,7 @@ class GDScriptLambdaCallable : public CallableCustom {
GDScriptFunction *function = nullptr;
Ref<GDScript> script;
uint32_t h;
GDScript::UpdatableFuncPtrElement updatable_func_ptr_element;
GDScript::UpdatableFuncPtrElement *updatable_func_ptr_element = nullptr;
Vector<Variant> captures;
@@ -72,7 +72,7 @@ class GDScriptLambdaSelfCallable : public CallableCustom {
Ref<RefCounted> reference; // For objects that are RefCounted, keep a reference.
Object *object = nullptr; // For non RefCounted objects, use a direct pointer.
uint32_t h;
GDScript::UpdatableFuncPtrElement updatable_func_ptr_element;
GDScript::UpdatableFuncPtrElement *updatable_func_ptr_element = nullptr;
Vector<Variant> captures;