delete unused referenses