*/
CAM_Application::~CAM_Application()
{
+ for ( QList<CAM_Module*>::const_iterator it = myModules.begin(); it != myModules.end(); ++it )
+ delete *it;
}
/*!
*/
QtxWorkstackTabBar::QtxWorkstackTabBar( QWidget* parent )
: QTabBar( parent ),
- myId( -1 )
+ myId( -1 ),myActive(false)
{
setDrawBase( true );
setElideMode( Qt::ElideNone );
/*!Create and return SALOME_NamingService.*/
SALOME_NamingService* SalomeApp_Application::namingService()
{
- static SALOME_NamingService* _ns = new SALOME_NamingService( orb() );
- return _ns;
+ static SALOME_NamingService _ns(orb());
+ return &_ns;
}
/*!Create and return SALOME_LifeCycleCORBA.*/
SALOME_LifeCycleCORBA* SalomeApp_Application::lcc()
{
- static SALOME_LifeCycleCORBA* _lcc = new SALOME_LifeCycleCORBA( namingService() );
- return _lcc;
+ static SALOME_LifeCycleCORBA _lcc( namingService() );
+ return &_lcc;
}
/*!Return default engine IOR for light modules*/
if ( !CORBA::is_nil(aComponent) && aComponent->hasObjectInfo() ) {
LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() );
if ( aRoot && aRoot->study() )
- return QString( aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData()) );
+ return QString( (CORBA::String_var)aComponent->getObjectInfo( aRoot->study()->id(), entry().toLatin1().constData()) );
}
}
}
delete myServerLauncher;
delete _NS;
- PyGILState_STATE gstate = PyGILState_Ensure();
- Py_Finalize();
-
try {
orb->shutdown(0);
}
// std::cerr << "Caught unexpected exception on destroy : ignored !!" << std::endl;
}
+ PyGILState_STATE gstate = PyGILState_Ensure();
+ //Destroy orb from python (for chasing memory leaks)
+ //PyRun_SimpleString("from omniORB import CORBA");
+ //PyRun_SimpleString("orb=CORBA.ORB_init([''], CORBA.ORB_ID)");
+ //PyRun_SimpleString("orb.destroy()");
+ Py_Finalize();
+
if ( shutdown )
killOmniNames();
+ MESSAGE( "Salome_Session_Server:endofserver" );
return result;
}
const char *registryName = "Registry";
Registry::Components_var varComponents;
try {
- RegistryService *ptrRegistry = SINGLETON_<RegistryService>::Instance();
+ RegistryService *ptrRegistry = new RegistryService;
ptrRegistry->SessionName( ptrSessionName );
ptrRegistry->SetOrb(_orb);
varComponents = ptrRegistry->_this();
+ ptrRegistry->_remove_ref(); //let poa manage registry service deletion
// The RegistryService must not already exist.
try {
}
string absoluteName = string("/") + registryName;
_NS->Register( varComponents , absoluteName.c_str() );
- MESSAGE("On attend les requetes des clients");
}
catch( const SALOME_Exception &ex ) {
INFOS( "Communication Error : " << ex.what() );