Update cleanup call order
This commit is contained in:
parent
780c553f79
commit
82b4362859
1 changed files with 4 additions and 4 deletions
|
@ -227,16 +227,16 @@ func get_custom_module(module_name: String) -> CoreBaseModule:
|
||||||
## Unloads all custom modules, built-in modules, frees any of CORE's classes and lastly itself.
|
## Unloads all custom modules, built-in modules, frees any of CORE's classes and lastly itself.
|
||||||
func cleanup() -> void:
|
func cleanup() -> void:
|
||||||
loggeri.info("Cleaning up")
|
loggeri.info("Cleaning up")
|
||||||
config.queue_free()
|
for module in custom_modules_node.get_children(): unregister_custom_module(module.name)
|
||||||
|
remove_child(custom_modules_node)
|
||||||
|
custom_modules_node.queue_free()
|
||||||
var modules_reverse: Array[String] = modules.duplicate()
|
var modules_reverse: Array[String] = modules.duplicate()
|
||||||
modules_reverse.reverse()
|
modules_reverse.reverse()
|
||||||
for module in modules_reverse:
|
for module in modules_reverse:
|
||||||
await get(module)._cleanup()
|
await get(module)._cleanup()
|
||||||
get(module).loggeri.queue_free()
|
get(module).loggeri.queue_free()
|
||||||
get(module).queue_free()
|
get(module).queue_free()
|
||||||
for module in custom_modules_node.get_children(): unregister_custom_module(module.name)
|
config.queue_free()
|
||||||
remove_child(custom_modules_node)
|
|
||||||
custom_modules_node.queue_free()
|
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
## Returns if the framework is in development mode.
|
## Returns if the framework is in development mode.
|
||||||
|
|
Loading…
Reference in a new issue