From 092f8f19e77de341f267f5579ebd8aa36e20b43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 28 Mar 2015 10:33:27 -0700 Subject: [PATCH] Fixed leak on exit. --- examples/common/entry/entry_p.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/common/entry/entry_p.h b/examples/common/entry/entry_p.h index d41ab568..d0ba7331 100644 --- a/examples/common/entry/entry_p.h +++ b/examples/common/entry/entry_p.h @@ -161,6 +161,14 @@ namespace entry class EventQueue { public: + ~EventQueue() + { + for (const Event* ev = poll(); NULL != ev; ev = poll() ) + { + release(ev); + } + } + void postAxisEvent(WindowHandle _handle, GamepadHandle _gamepad, GamepadAxis::Enum _axis, int32_t _value) { AxisEvent* ev = new AxisEvent(_handle);