]> git.tdb.fi Git - libs/core.git/commitdiff
Avoid leaking external references through default c'tors and d'tors
authorMikko Rasa <tdb@tdb.fi>
Tue, 27 Aug 2013 19:39:17 +0000 (22:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 27 Aug 2013 19:39:17 +0000 (22:39 +0300)
source/io/eventdispatcher.cpp
source/io/eventdispatcher.h
source/io/eventobject.cpp
source/io/eventobject.h

index 3a3baa673d1c08a4412f9a875af1a6cd086f1583..144ad49bcf89a0670ea6f5c9e254120586bd91df 100644 (file)
@@ -9,6 +9,9 @@ namespace IO {
 EventDispatcher::EventDispatcher()
 { }
 
+EventDispatcher::~EventDispatcher()
+{ }
+
 void EventDispatcher::add(EventObject &obj)
 {
        SlotMap::iterator i = objects.find(&obj);
index 04d037e29df5fe5085127a74b75a1bfe66d01ccb..25455ab842f510f10e5c18f14e28779de8467b5f 100644 (file)
@@ -32,6 +32,7 @@ private:
 
 public:
        EventDispatcher();
+       ~EventDispatcher();
 
        void add(EventObject &);
        void remove(EventObject &);
index 333d1124c96b29e838b5e6797195de2e8e2c60f0..d61543c4161dd962593495c70608c58d109eb4ed 100644 (file)
@@ -7,6 +7,9 @@ EventObject::EventObject():
        events(P_NONE)
 { }
 
+EventObject::~EventObject()
+{ }
+
 void EventObject::set_events(PollEvent e)
 {
        events = e;
index 16d6d8254e78b111aeff6c9e541b2e866cadf667..88a71c7dbac804db31ac8d22ad56dc4199c455ed 100644 (file)
@@ -29,6 +29,7 @@ private:
 
 protected:
        EventObject();
+       virtual ~EventObject();
 
        void set_events(PollEvent);
 public: