Write declaration, definition and advantages of
destructor.
Answers
Advantages:-
As advantages, basically is that you don't need to remember to free the resources; if your destructor is defined, you shuld be safe that the destructor is called automatically, without calling it explicitly. no problem if you forget to call it, is not needed that you call it, is automatic
I hope this will help you
pls mark me brainliest and vote me also don't forget to follow me and pls thank me if this answer helps you!
Thank You
Regards,
Drishti Arora
Answer:
Hi .......
good afternoon dear......
✏Destructors are used to destroy the objects created by the Constructors when they are not needed anymore to release the memory. They are special member functions and called automatically by C++. compiler to free up the memory when there is no user-defined destructor in the program.......