Hello,
so I've got this nifty little function that someone wrote for the project:
func load_all(file_path):
var save_game = File.new()
if !save_game.file_exists(file_path):
print("No save file detected.")
return
pass
save_game.open(file_path, File.READ)
var save_string = save_game.get_as_text()
var save_data : Dictionary = str2var(save_string)
#load the data on each node
get_tree().call_group_flags(2, "save", "load_save", save_data)
#for node in get_tree().get_nodes_in_group("save"):
# node.load_save(save_data)
save_game.close()
however, i've located a memory leak that occurs when this like is executed:
var save_data : Dictionary = str2var(save_string)
I'm not sure why this is occurring, so does anyone know why, or under what circumstances str2var can create a memory leak?
here's the leaks. they seem to vary in weirdness. the @@ makes me thing it's instancing new nodes, but there's nothing i can think of that would create that many nodes in my scene. plus, the basecharacter script it mentions isn't even being used at the moment.
