From: ptv Date: Fri, 14 Jul 2006 04:48:25 +0000 (+0000) Subject: remove memory leaks uninitalised memory read, etc... X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7fbf4225c2984bc3e88f7fc665c233054a87fd70;p=modules%2Fgeom.git remove memory leaks uninitalised memory read, etc... noticed with Rational Purify on Windows --- diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index d8ec38847..b0832eda3 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -452,7 +452,8 @@ bool BlocksGUI_ExplodeDlg::execute (ObjectList& objects) ObjectList toRemoveFromEnggine; ObjectList::iterator anIter; for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter) { - if (selected.contains(myGeomGUI->getApp()->orb()->object_to_string(*anIter))) + CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string(*anIter); + if (selected.contains(QString(objStr.in()))) objects.push_back(*anIter); else toRemoveFromEnggine.push_back(*anIter); diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index aaa7a3eca..dd2924e91 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -1358,7 +1358,8 @@ void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object, getDisplayer()->SetToActivate( activate ); // Make a reference to GEOM_Object - getDisplayer()->SetName( myGeometryGUI->getApp()->orb()->object_to_string( object ) ); + CORBA::String_var objStr = myGeometryGUI->getApp()->orb()->object_to_string( object ); + getDisplayer()->SetName( objStr.in() ); // Create wire from applayed object TopoDS_Shape anApplyedWire, aLastSegment;