diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index 438804e1..0617093a 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -68,7 +69,10 @@ namespace IPC { } ///\brief The deconstructor - semaphore::~semaphore() {} + semaphore::~semaphore() { + close(); + } + ///\brief Returns whether we have a valid semaphore semaphore::operator bool() const {