From 92a551b96e625257def26771155ebd64c6d8757e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 29 Jun 2014 00:06:23 +0000 Subject: fixed not working singletons - still not threadsafe but at least they don't pretend to be --- src/connectionList.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/connectionList.h') diff --git a/src/connectionList.h b/src/connectionList.h index e0adf55..46bb998 100644 --- a/src/connectionList.h +++ b/src/connectionList.h @@ -47,7 +47,9 @@ class ConnectionList public: ConnectionList(); ~ConnectionList(); + static ConnectionList& instance(); + void addConnection(ConnectionParam& conn, uint16_t mux); const ConnectionMap::iterator getConnection(uint16_t mux); const ConnectionMap::iterator getEnd(); @@ -60,17 +62,6 @@ public: Mutex& getMutex(); private: - static Mutex instMutex; - static ConnectionList* inst; - class instanceCleaner - { - public: - ~instanceCleaner() { - if(ConnectionList::inst != 0) { - delete ConnectionList::inst; - } - } - }; ConnectionList(const ConnectionList& s); void operator=(const ConnectionList& s); ConnectionMap connections_; -- cgit v1.2.3