From: ageay Date: Wed, 10 Apr 2013 13:51:16 +0000 (+0000) Subject: Memory leak kill X-Git-Tag: V6_main_FINAL~163 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66c4d2b4164c71eaf5ec07d5f20157a2570c2885;p=tools%2Fmedcoupling.git Memory leak kill --- diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index 8eefe13df..5d6b783f9 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -545,7 +545,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildSubPart(const int *partBg, DataArrayInt *arrSelect; MEDCouplingAutoRefCountObjectPtr m=_type->buildSubMeshData(_mesh,partBg,partEnd,arrSelect); MEDCouplingAutoRefCountObjectPtr arrSelect2(arrSelect); - MEDCouplingFieldDouble *ret=clone(false);//quick shallow copy. + MEDCouplingAutoRefCountObjectPtr ret=clone(false);//quick shallow copy. const MEDCouplingFieldDiscretization *disc=getDiscretization(); if(disc) ret->setDiscretization(MEDCouplingAutoRefCountObjectPtr(disc->clonePart(partBg,partEnd))); @@ -566,7 +566,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildSubPart(const int *partBg, for(std::vector::const_iterator iter=arrs.begin();iter!=arrs.end();iter++) if(*iter) (*iter)->decrRef(); - return ret; + return ret.retn(); } TypeOfTimeDiscretization MEDCouplingFieldDouble::getTimeDiscretization() const