THRIFT: Mutex and ReadWriteMutex leaked memory, now they don't
Summary: also added myself to CONTRIBUTORS.
Reviewed By: marc
Test Plan: the following program no longer leaks memory (valgrind):
int main(int argc, char **argv){
Mutex mu;
mu.lock();
mu.unlock();
}
Revert Plan: ok
Notes: this is kind of important
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665279 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h
index 72f7525..b19e3c5 100644
--- a/lib/cpp/src/concurrency/Mutex.h
+++ b/lib/cpp/src/concurrency/Mutex.h
@@ -18,7 +18,7 @@
class Mutex {
public:
Mutex();
- virtual ~Mutex() {}
+ virtual ~Mutex();
virtual void lock() const;
virtual bool trylock() const;
virtual void unlock() const;
@@ -31,7 +31,7 @@
class ReadWriteMutex {
public:
ReadWriteMutex();
- virtual ~ReadWriteMutex() {}
+ virtual ~ReadWriteMutex();
// these get the lock and block until it is done successfully
virtual void acquireRead() const;