Used scoped_ptr for lock
authorscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 13 Feb 2012 02:34:04 +0000 (02:34 +0000)
committerscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 13 Feb 2012 02:34:04 +0000 (02:34 +0000)
git-svn-id: https://svn.shibboleth.net/cpp-sp/branches/REL_2@3580 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/TransactionLog.h
shibsp/impl/TransactionLog.cpp

index a168b68..1f738de 100644 (file)
@@ -35,6 +35,7 @@
 #include <map>
 #include <vector>
 #include <iostream>
+#include <boost/scoped_ptr.hpp>
 
 namespace xmltooling {
     class XMLTOOL_API Mutex;
@@ -169,7 +170,7 @@ namespace shibsp {
         virtual void write(const Event& e);
 
     private:
-        xmltooling::Mutex* m_lock;
+        boost::scoped_ptr<xmltooling::Mutex> m_lock;
         std::string m_absent;
         std::vector<std::string> m_formatting;
     };
index 7a8799f..1f6712d 100644 (file)
@@ -113,7 +113,6 @@ TransactionLog::TransactionLog(const char* fmt, const char* absent)
 
 TransactionLog::~TransactionLog()
 {
-    delete m_lock;
 }
 
 Lockable* TransactionLog::lock()