Answer:
Destructor:-To free the resources when lifetime of an object ends.
Accessor:-To access private properties of the class.
Step-by-step explanation:
The purpose of a destructor is to free the resources of the object that it has acquired during it's lifetime. A destructor is called once in the lifetime of the object that is also when the ifetime of the object ends.
The purpose of the accessors is to access private properties of the class.Accessor cannot change the value of the private members.They are also called getters.