From 98380e785236edb28a33d82e08803dc9f875eee8 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 30 Jun 2016 14:38:14 +0300 Subject: [PATCH] Memory leaks --- src/GEOM_I/GEOM_Gen_i.cc | 7 ++++--- src/OBJECT/GEOM_Actor.cxx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index bb69e6fd1..5e1710bfa 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -225,7 +225,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, SALOMEDS::GenericAttribute_var anAttr; SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - SALOMEDS::UseCaseBuilder_var useCaseBuilder = theStudy->GetUseCaseBuilder(); + SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder(); SALOMEDS::SComponent_var aFather = theStudy->FindComponent("GEOM"); if (aFather->_is_nil()) { @@ -2809,8 +2809,9 @@ char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry) } } - char* anInfo = new char[strlen("Module ") + strlen(ComponentDataType()) + strlen(", ") + strlen(aTypeInfo) + 3]; - sprintf(anInfo, "Module %s, %s", ComponentDataType(), aTypeInfo); + CORBA::String_var compType = ComponentDataType(); + char* anInfo = new char[strlen("Module ") + strlen(compType.in()) + strlen(", ") + strlen(aTypeInfo) + 3]; + sprintf(anInfo, "Module %s, %s", compType.in(), aTypeInfo); char* ret = CORBA::string_dup(anInfo); delete [] anInfo; diff --git a/src/OBJECT/GEOM_Actor.cxx b/src/OBJECT/GEOM_Actor.cxx index 5bd74274f..3104e5007 100644 --- a/src/OBJECT/GEOM_Actor.cxx +++ b/src/OBJECT/GEOM_Actor.cxx @@ -217,6 +217,7 @@ GEOM_Actor::~GEOM_Actor() #ifdef MYDEBUG MESSAGE (this<< " ~GEOM_Actor::GEOM_Actor"); #endif + myTextActor->Delete(); myHighlightProp->Delete(); myPreHighlightProp->Delete(); myShadingFaceProp->Delete(); -- 2.39.2