Can destructors be private? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can destructors be private?

4th Aug 2017, 2:20 PM
Chandan Shetti
Chandan Shetti - avatar
2 Answers
+ 4
i think they are private by default
4th Aug 2017, 2:25 PM
Damon Keane
+ 2
Of course, that will only allow you to use it internally. You couldn't to use it to make object outside of the class.
4th Aug 2017, 5:12 PM
Oscar Albornoz
Oscar Albornoz - avatar