From: eap Date: Wed, 24 Jul 2013 12:42:52 +0000 (+0000) Subject: 22261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs X-Git-Tag: V7_3_0a1~255 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=52b6bfaabb8e4db7d6f74d4f9fd269c42c7abc5d;hp=adab833f26ee728732c62f10de35b5c64aa96d39 22261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs - QString IOR = app->orb()->object_to_string( theObject ); + CORBA::String_var ior = app->orb()->object_to_string( theObject ); --- diff --git a/src/SMESHGUI/SMESHGUI_Utils.cxx b/src/SMESHGUI/SMESHGUI_Utils.cxx index 26f361984..563e740ad 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.cxx +++ b/src/SMESHGUI/SMESHGUI_Utils.cxx @@ -215,10 +215,10 @@ namespace SMESH SalomeApp_Application* app = dynamic_cast (SUIT_Session::session()->activeApplication()); if ( app ) { - QString IOR = app->orb()->object_to_string( theObject ); + CORBA::String_var ior = app->orb()->object_to_string( theObject ); SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( study && !IOR.isEmpty() ) - res = study->studyDS()->FindObjectIOR( IOR.toLatin1().constData() ); + if ( study && strlen( ior ) > 0 ) + res = study->studyDS()->FindObjectIOR( ior.in() ); } return res; }