Can destructors be private? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
+ 4

Can destructors be private?

4th Aug 2017, 2:20 PM
Chandan Shetti
Chandan Shetti - avatar
2 Respostas
+ 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