delete menu option and memory management.