Replace mutex lock/unlock pairs with guards, cleanups

This commit is contained in:
vsonnier
2016-06-02 23:56:31 +02:00
parent ad94fe6de3
commit 5bb43f5aaa
17 changed files with 265 additions and 199 deletions
+6
View File
@@ -37,6 +37,12 @@ public:
std::lock_guard < std::recursive_mutex > lock(m_mutex);
return refCount;
}
// Access to the own mutex protecting the ReferenceCounter, i.e the monitor of the class
std::recursive_mutex& getMonitor() const {
return m_mutex;
}
protected:
//this is a basic mutex for all ReferenceCounter derivatives operations INCLUDING the counter itself for consistency !
mutable std::recursive_mutex m_mutex;