(file) Return to Sharable.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Sharable.h between version 1.18 and 1.19

version 1.18, 2005/11/07 23:18:15 version 1.19, 2005/11/20 06:35:26
Line 40 
Line 40 
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Linkage.h> #include <Pegasus/Common/Linkage.h>
 #include <Pegasus/Common/IPC.h> #include <Pegasus/Common/IPC.h>
 #include <assert.h>  #include <Pegasus/Common/PegasusAssert.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 67 
Line 67 
     friend void Dec(Sharable* sharable);     friend void Dec(Sharable* sharable);
  
 private: private:
     Sharable(const Sharable &s) : _ref(1) {assert(0);}      Sharable(const Sharable &s) : _ref(1) {PEGASUS_DEBUG_ASSERT(0);}
     // we should never copy a counter, so we make this private - dte     // we should never copy a counter, so we make this private - dte
     AtomicInt _ref;     AtomicInt _ref;
 }; };
Line 76 
Line 76 
 { {
     if (x)     if (x)
     {     {
 #ifdef PEGASUS_DEBUG  
         // A sharable object should never be incremented from zero.         // A sharable object should never be incremented from zero.
         // If so, there is a double delete being cause by impropoer use         // If so, there is a double delete being cause by impropoer use
         // of sharable assignment or copy constructors somewhere         // of sharable assignment or copy constructors somewhere
         // << Wed Nov  6 12:46:52 2002 mdd >>         // << Wed Nov  6 12:46:52 2002 mdd >>
         assert(((Sharable*)x)->_ref.get());          PEGASUS_DEBUG_ASSERT(((Sharable*)x)->_ref.get());
 #endif  
         x->_ref++;         x->_ref++;
     }     }
 } }


Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2