actually freed the perm_array