+ 2

what happens if destructor is not present?

23rd Jun 2016, 7:12 PM
rohith chittamuru
rohith chittamuru - avatar
7 Answers
+ 1
nothing will happen :) destructors are optional :) they are not required to be present in your code.
24th Jun 2016, 1:02 PM
Erwin Mesias
Erwin Mesias - avatar
not thing
24th Jun 2016, 12:34 AM
Farshid Rezaei
Farshid Rezaei - avatar
destructors are optional... you can use them or not use them.... just in case: they are used to do stuff before deleting an object... like writing by console "destruction >:D!!"
29th Jun 2016, 2:46 AM
destructor are not necessarily added.... a program can run successfully without using a destructor.
2nd Jul 2016, 10:39 AM
Nikita Singh
Nikita Singh - avatar
Our world will be safe
15th Jul 2016, 7:43 AM
Genti Perja
memory is not freed
5th Feb 2017, 6:41 PM
Rohit Thakur
- 11
the compiler will not let you create a class
23rd Jun 2016, 9:42 PM
Anton Furman
Anton Furman - avatar