diff options
author | hop311 <hop3114@gmail.com> | 2024-07-26 22:59:12 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-07-26 22:59:12 +0200 |
commit | 164db4eb8f24e87755e02bae0e539f4f266e15b9 (patch) | |
tree | 9ab24e79d47c2c56dfd68ebf89e419d30324c92c /game/src/Game/GameSession/MapText.gd | |
parent | 46c3009075be36577ab7dbea263655e428833b20 (diff) |
Free removed child nodes + `godot::` cleanupfree-on-remove
Diffstat (limited to 'game/src/Game/GameSession/MapText.gd')
-rw-r--r-- | game/src/Game/GameSession/MapText.gd | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/game/src/Game/GameSession/MapText.gd b/game/src/Game/GameSession/MapText.gd index 22eba10..619c72f 100644 --- a/game/src/Game/GameSession/MapText.gd +++ b/game/src/Game/GameSession/MapText.gd @@ -14,7 +14,9 @@ func _clear_children() -> void: var child_count : int = get_child_count() while child_count > 0: child_count -= 1 - remove_child(get_child(child_count)) + var child : Node = get_child(child_count) + remove_child(child) + child.queue_free() func generate_map_names() -> void: _clear_children() |