GDScript Eliminar objetos eliminados de la matriz

for object in array:
	if ! is_instance_valid(object):
		array.erase(object)
ProMikeSundays