activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1089677 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks: ReentrantLock.cpp ReentrantLock.h
Date Wed, 06 Apr 2011 23:40:13 GMT
Author: tabish
Date: Wed Apr  6 23:40:13 2011
New Revision: 1089677

URL: http://svn.apache.org/viewvc?rev=1089677&view=rev
Log:
Don't create a smart pointer to an incomplete type, Windows complains.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.cpp?rev=1089677&r1=1089676&r2=1089677&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.cpp
Wed Apr  6 23:40:13 2011
@@ -209,7 +209,7 @@ ReentrantLock::ReentrantLock() : handle(
 ////////////////////////////////////////////////////////////////////////////////
 ReentrantLock::~ReentrantLock() {
     try{
-        this->handle.reset( NULL );
+        delete this->handle;
     }
     DECAF_CATCHALL_NOTHROW()
 }
@@ -345,7 +345,7 @@ void ReentrantLock::unlock() {
 ////////////////////////////////////////////////////////////////////////////////
 Condition* ReentrantLock::newCondition() {
 
-    return new ConditionObject( this->handle.get() );
+    return new ConditionObject( this->handle );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.h?rev=1089677&r1=1089676&r2=1089677&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/locks/ReentrantLock.h
Wed Apr  6 23:40:13 2011
@@ -21,7 +21,6 @@
 #include <decaf/util/Config.h>
 
 #include <decaf/util/concurrent/locks/Lock.h>
-#include <decaf/lang/Pointer.h>
 
 namespace decaf {
 namespace util {
@@ -80,7 +79,7 @@ namespace locks {
     class DECAF_API ReentrantLock : public Lock {
     private:
 
-        decaf::lang::Pointer<LockHandle> handle;
+        LockHandle* handle;
 
     private:
 
@@ -296,7 +295,7 @@ namespace locks {
          *
          *  class X {
          *  private:
-         *      ReentrantLock lock = new ReentrantLock();
+         *      ReentrantLock lock;
          *      // ...
          *
          *  public:
@@ -311,7 +310,7 @@ namespace locks {
          *
          *   class X {
          *   private:
-         *      ReentrantLock lock = new ReentrantLock();
+         *      ReentrantLock lock;
          *      // ...
          *
          *   public:



Mime
View raw message