aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-05-09 19:30:43 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:48 +0100
commit98de332020a74f59de83495ba540de198d971f2c (patch)
treed145e830a8717dd6ac6420bac321ed189f6c0e27 /src
parent2390e4c01835506f53e80c796ed360befd768c3b (diff)
downloadusdx-98de332020a74f59de83495ba540de198d971f2c.tar.gz
usdx-98de332020a74f59de83495ba540de198d971f2c.tar.xz
usdx-98de332020a74f59de83495ba540de198d971f2c.zip
correctly locking and freeing the event buffers on destruction
Diffstat (limited to 'src')
-rw-r--r--src/menu/event_manager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/menu/event_manager.cpp b/src/menu/event_manager.cpp
index ecb5668f..6d607e6d 100644
--- a/src/menu/event_manager.cpp
+++ b/src/menu/event_manager.cpp
@@ -39,6 +39,12 @@ namespace usdx
EventManager::~EventManager(void)
{
+ boost::mutex::scoped_lock lock(mutex);
+
+ while (waiting > 0) {
+ --waiting;
+ delete buffer[waiting];
+ }
}
bool EventManager::is_not_full() const