J
Jimmy
Hi
when do you use destructors and what are the advantages /disadvantages?
ch Jim
when do you use destructors and what are the advantages /disadvantages?
ch Jim
Jimmy said:Hi
when do you use destructors and what are the advantages /disadvantages?
ch Jim
Mythran said:Use destructors anytime you need to cleanup when the class gets destroyed.
Basically, you would implement the IDisposable interface's Dispose() method.
Normally, cleanup includes closing any open files, closing database
connections, cleaning up unmanaged resources, et cetera.
HTH,
Mythran