![jmiller2446](/avatars/18817.jpg)
jmiller2446
07.08.2019 •
Computers and Technology
Provide examples of the type of program statement that should be placed in a destructor.
Solved
Show answers
More tips
- H Health and Medicine AKDS Vaccination: Ensure Your Child s Safety...
- H Health and Medicine Naskol ko Opasen Ukus Kleshcha i Kak Ego Raspoznat...
- H Health and Medicine 10 Ways to Cleanse Your Colon and Improve Your Health...
- D Dating, Love, Relationships How to Overcome Jealousy: Tips and Tricks...
- H Health and Medicine Angina: Causes, Symptoms, and Treatment...
- C Computers and Internet How to Learn to Type Fast?...
- F Food and Cooking Delight for Gourmets: How to Prepare Liver Pate...
- S Style and Beauty How to braid friendship bracelets?...
- H Health and Medicine Mercury Thermometer Danger: What to do when a thermometer breaks?...
- F Food and Cooking Which Calamari Salad is the Most Delicious?...
Ответ:
Explanation:
A destructor is called when there is a need to destruct or delete the object that is already created. As a Constructor is used to create an object, similarly a destructor is used to destruct the object. As there will be a default Constructor which is called when creating a new object, the default destructor is called to Destruct the object when the object goes out of scope or the function ends or program ends or a block containing that particular local variable ends or a delete operator is called.Examples for the destructor are (as the destructor contains delete operators )
Examples : delete []s ; In this example when the destructor is called, the delete operator will be called and the object created destructs.
Ответ: