What is destructor sign? Why it is used? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is destructor sign? Why it is used?

What is it and why is that used

1st Nov 2016, 4:21 AM
ankeet mishra
ankeet mishra - avatar
6 Answers
+ 2
~
1st Nov 2016, 1:16 PM
MSK
MSK - avatar
+ 2
destructors are used to release memory when you come out of a program
1st Nov 2016, 5:49 PM
Graham Caswell
Graham Caswell - avatar
+ 1
~
1st Nov 2016, 6:18 AM
Pooja Mishra
Pooja Mishra - avatar
0
~
1st Nov 2016, 4:27 AM
Ashutosh Kumar
Ashutosh Kumar - avatar
0
destructors are used to free the space occupied by constructors. Even if we do not declare or define a destructor there is a default one.It automatically works out as the curly brace of constructor closes and frees the space occupied by it.
7th Nov 2016, 12:34 PM
MSK
MSK - avatar
0
~
21st Oct 2022, 2:32 AM
Arif Setyawan
Arif Setyawan - avatar