Computer Science, asked by imran1h2481181, 4 months ago

Write declaration, definition and advantages of
destructor.​

Answers

Answered by drishtiarora1117
1

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

Answered by baby2006
1

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.......

Hope it helps you dear.....

Similar questions