mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
remove freed decks from container dicts on exit cleanup
This commit is contained in:
parent
f760cd227d
commit
d4d17be574
|
@ -272,25 +272,27 @@ static func close_deck(deck_id: String) -> Array:
|
|||
|
||||
|
||||
static func pre_exit_cleanup() -> void:
|
||||
for deck_id: String in decks:
|
||||
for deck_id: String in decks.keys():
|
||||
if decks[deck_id] is Deck:
|
||||
var deck: Deck = decks[deck_id]
|
||||
print_verbose("DeckHolder: freeing deck %s, id %s" % [deck.id, deck.get_instance_id()])
|
||||
deck.pre_exit_cleanup()
|
||||
deck.free()
|
||||
else:
|
||||
for instance_id: String in decks[deck_id]:
|
||||
for instance_id: String in (decks[deck_id] as Dictionary).keys():
|
||||
var deck: Deck = decks[deck_id][instance_id]
|
||||
print_verbose("DeckHolder: freeing group %s::%s, id %s" % [deck_id, instance_id, deck.get_instance_id()])
|
||||
deck.pre_exit_cleanup()
|
||||
deck.free()
|
||||
decks.erase(deck_id)
|
||||
|
||||
for lib_id: String in lib_groups:
|
||||
for lib_id: String in lib_groups.keys():
|
||||
for instance_id: String in lib_groups[lib_id]:
|
||||
var deck: Deck = lib_groups[lib_id][instance_id]
|
||||
print_verbose("DeckHolder: freeing lib group %s::%s, id %s" % [lib_id, instance_id, deck.get_instance_id()])
|
||||
deck.pre_exit_cleanup()
|
||||
deck.free()
|
||||
lib_groups.erase(lib_id)
|
||||
|
||||
|
||||
static func send_event(event_name: StringName, event_data: Dictionary = {}) -> void:
|
||||
|
|
Loading…
Reference in a new issue