>Where would an exception be thrown if an exception is not handled in the destructor?
>
>The reason I am asking is because I would like to add code to my destructor to shutdown and close a socket if the socket is not shutdown and close before the destructor is executed.
>
>Kind of an odd question but it is almost 5 and my brain is overloaded.
Einar,
An exception is not thrown in the destructor because the code is executed by the Garbage Collector and the context is undefined. You have to close the socket in another event.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement