Attempt to clean up any buffers that weren't used on terminate, still one hanging around..

This commit is contained in:
Charles J. Cliffe
2016-06-07 20:36:59 -04:00
parent 389ac4f537
commit 50bfb251f8
4 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -231,8 +231,9 @@ public:
/**
* Remove any items in the queue.
*/
void flush() const {
void flush() {
std::lock_guard < std::mutex > lock(m_mutex);
m_queue = std::queue<T, Container>();
std::queue<T, Container> emptyQueue;
std::swap(m_queue, emptyQueue);
}