From: jrt Date: Thu, 25 Mar 2004 17:17:33 +0000 (+0000) Subject: Fix a bug: Crashing when loading submeshes. It seems that c++ delete keyword must... X-Git-Tag: V2_0_0b1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=36c731ec63540ef4a2acca3574631705b7ba32e5;p=modules%2Fsmesh.git Fix a bug: Crashing when loading submeshes. It seems that c++ delete keyword must not be applied to HDF object. --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 773deda15..511cddd73 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -1145,7 +1145,6 @@ void SMESH_Gen_i::loadAppliedAlgorithms(HDFgroup * hdfGroupMeshId, char *refFromFile = new char[dataset->GetSize()]; dataset->ReadFromDisk(refFromFile); dataset->CloseOnDisk(); - delete dataset; if (_found) { @@ -1216,7 +1215,6 @@ void SMESH_Gen_i::loadSubMeshes(HDFgroup * hdfGroupMeshId, char * msgname, char *refFromFile = new char[hdf_dataset->GetSize()]; hdf_dataset->ReadFromDisk(refFromFile); hdf_dataset->CloseOnDisk(); - delete hdf_dataset; bool _found3 = false; SALOMEDS::SObject_var GSO = Study->FindObjectID(refFromFile); @@ -1372,10 +1370,8 @@ void SMESH_Gen_i::loadSubMeshes(HDFgroup * hdfGroupMeshId, char * msgname, } } hdf_subgroupmyTag->CloseOnDisk(); - delete hdf_subgroupmyTag; } hdf_subgroupmyLevel1Tag->CloseOnDisk(); - delete hdf_subgroupmyLevel1Tag; } GEOM::GEOM_Gen_var SMESH_Gen_i::getGeomEngine()