From: ageay Date: Tue, 21 Feb 2012 16:26:48 +0000 (+0000) Subject: Correction of invalid desallocation of returned MEDCouplingUMesh::getCoords and MEDFi... X-Git-Tag: V6_main_FINAL~832 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=33c1f3e0750df4647ba6989f9680ee792e9e2ffc;p=tools%2Fmedcoupling.git Correction of invalid desallocation of returned MEDCouplingUMesh::getCoords and MEDFileUMesh::getCoords. --- diff --git a/src/MEDLoader/Test/SauvLoaderTest.cxx b/src/MEDLoader/Test/SauvLoaderTest.cxx index 42926a2d1..029aa4af7 100644 --- a/src/MEDLoader/Test/SauvLoaderTest.cxx +++ b/src/MEDLoader/Test/SauvLoaderTest.cxx @@ -58,7 +58,7 @@ void SauvLoaderTest::testMed2Sauv() // add 3 faces to pointeMed MEDFileUMesh* pointeMedMesh = static_cast(pointeMed->getMeshes()->getMeshAtPos(0)); MEDCouplingAutoRefCountObjectPtr pointeM1D = MEDCouplingUMesh::New(); - MEDCouplingAutoRefCountObjectPtr coords = pointeMedMesh->getCoords(); + DataArrayDouble *coords = pointeMedMesh->getCoords(); pointeM1D->setCoords( coords ); pointeM1D->setMeshDimension( 2 ); pointeM1D->allocateCells( 3 ); @@ -140,8 +140,8 @@ void SauvLoaderTest::testMed2Sauv() CPPUNIT_ASSERT_EQUAL(2, um1->getNumberOfCellsWithType( INTERP_KERNEL::NORM_TRI3 )); MEDCouplingAutoRefCountObjectPtr pointeUM0 = static_cast( pointeMedMesh->getGenMeshAtLevel(0)); - MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > coo = m->getCoords(); - MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > pointeCoo = pointeMedMesh->getCoords(); + DataArrayDouble *coo = m->getCoords(); + DataArrayDouble *pointeCoo = pointeMedMesh->getCoords(); CPPUNIT_ASSERT(coo->isEqualWithoutConsideringStr(*pointeCoo,1e-12)); MEDCouplingAutoRefCountObjectPtr vol = um0->getMeasureField(0); MEDCouplingAutoRefCountObjectPtr pointeVol = pointeUM0->getMeasureField(0);