I'm writing a server application. Following RIIA, in the constructor of one of my classes I create a file and in the destructor I delete it. This class is wrapped in a unique_ptr. This being a server application, I can only kill it by sending it a signal (SIGINT).
The strange part is that I've placed std::cerr statements on the destructors of the class held by the unique_ptr and they're not called when the application closes/dies.
Is this expected when ctrl+c is pressed or am I missing something obvious in relation to destructors?
Aucun commentaire:
Enregistrer un commentaire