From 33c1f3e0750df4647ba6989f9680ee792e9e2ffc Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 21 Feb 2012 16:26:48 +0000 Subject: [PATCH] Correction of invalid desallocation of returned MEDCouplingUMesh::getCoords and MEDFileUMesh::getCoords. --- src/MEDLoader/Test/SauvLoaderTest.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.2