mirror of
https://github.com/godotengine/godot.git
synced 2025-10-21 00:43:46 +00:00
Merge pull request #65910 from KoBeWi/gdsus
Cleanup function state connections when destroying instance
This commit is contained in:
commit
604493eb6e
3 changed files with 22 additions and 2 deletions
|
@ -296,6 +296,15 @@ void GDScriptFunctionState::_clear_stack() {
|
|||
}
|
||||
}
|
||||
|
||||
void GDScriptFunctionState::_clear_connections() {
|
||||
List<Object::Connection> conns;
|
||||
get_signals_connected_to_this(&conns);
|
||||
|
||||
for (Object::Connection &c : conns) {
|
||||
c.signal.disconnect(c.callable);
|
||||
}
|
||||
}
|
||||
|
||||
void GDScriptFunctionState::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("resume", "arg"), &GDScriptFunctionState::resume, DEFVAL(Variant()));
|
||||
ClassDB::bind_method(D_METHOD("is_valid", "extended_check"), &GDScriptFunctionState::is_valid, DEFVAL(false));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue