From: Mikko Rasa Date: Sat, 20 Apr 2013 13:07:52 +0000 (+0300) Subject: Fix a memory leak in Poller X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=bb719167603abe640052de1ed119b6522b7b912e;p=libs%2Fcore.git Fix a memory leak in Poller --- diff --git a/source/io/poll.cpp b/source/io/poll.cpp index fb5c62f..e8c5804 100644 --- a/source/io/poll.cpp +++ b/source/io/poll.cpp @@ -107,6 +107,11 @@ Poller::Poller(): objs_changed(false) { } +Poller::~Poller() +{ + delete priv; +} + void Poller::set_object(EventObject &obj, PollEvent ev) { // Verify that the object has an event handle diff --git a/source/io/poll.h b/source/io/poll.h index 78e6088..d7823aa 100644 --- a/source/io/poll.h +++ b/source/io/poll.h @@ -54,6 +54,7 @@ private: public: Poller(); + ~Poller(); void set_object(EventObject &, PollEvent); int poll();