]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Debug revealed with convertTo
authorageay <ageay>
Fri, 28 Jun 2013 08:21:34 +0000 (08:21 +0000)
committerageay <ageay>
Fri, 28 Jun 2013 08:21:34 +0000 (08:21 +0000)
src/MEDCoupling/MEDCouplingRefCountObject.cxx
src/MEDCoupling/MEDCouplingRefCountObject.hxx

index c8de20ea996aef5ae3d3f85be783a7c5c690a308..443ae2cd8ff584b590f3cd78cd9cea3fec935eb7 100644 (file)
@@ -54,6 +54,15 @@ RefCountObject::RefCountObject(const RefCountObject& other):_cnt(1)
 {
 }
 
+/*!
+ * Do nothing here ! It is not a bug ( I hope :) ) because all subclasses that
+ * copies using operator= should not copy the ref counter of \a other !
+ */
+RefCountObject& RefCountObject::operator=(const RefCountObject& other)
+{
+  return *this;
+}
+
 bool RefCountObject::decrRef() const
 {
   bool ret=((--_cnt)==0);
index 0eb1f4deab79b22645baefbc315f65b06b63abc6..c52e0aff0bc35f702b8ca7fd752dfcd716f0f1c8 100644 (file)
@@ -67,6 +67,7 @@ namespace ParaMEDMEM
     void incrRef() const;
     virtual std::size_t getHeapMemorySize() const = 0;
     int getRCValue() const;
+    RefCountObject& operator=(const RefCountObject& other);
   protected:
     virtual ~RefCountObject();
   private: