]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/runtime/SalomeContainer.cxx
Salome HOME
First test qui HPsalome container is running.
[modules/yacs.git] / src / runtime / SalomeContainer.cxx
index 38ec232357b5274e0f2199b8d7900c4123c295ac..849e7e5af04b5bdcaecb99496c44153dc3222c8f 100644 (file)
@@ -64,9 +64,17 @@ SalomeContainer::SalomeContainer(const SalomeContainer& other)
 {
 }
 
+SalomeContainer::SalomeContainer(const Container& other, const SalomeContainerTools& sct, SalomeContainerHelper *lmt,
+                                 const std::vector<std::string>& componentNames, int shutdownLev):Container(other),_componentNames(componentNames),
+                                     _launchModeType(lmt),_shutdownLevel(shutdownLev),_sct(sct)
+{
+  if(lmt)
+    lmt->incrRef();
+}
+
 SalomeContainer::~SalomeContainer()
 {
-  delete _launchModeType;
+  _launchModeType->decrRef();
 }
 
 void SalomeContainer::lock()
@@ -76,7 +84,7 @@ void SalomeContainer::lock()
 
 void SalomeContainer::unLock()
 {
-  _mutex.unlock();
+  _mutex.unLock();
 }
 
 Container *SalomeContainer::clone() const
@@ -107,12 +115,12 @@ void SalomeContainer::setProperty(const std::string& name, const std::string& va
     {
       if (value == SalomeContainerMonoHelper::TYPE_NAME)
         {
-          delete _launchModeType;
+          _launchModeType->decrRef();
           _launchModeType=new SalomeContainerMonoHelper;
         }
       else if (value == SalomeContainerMultiHelper::TYPE_NAME)
         {
-          delete _launchModeType;
+          _launchModeType->decrRef();
           _launchModeType=new SalomeContainerMultiHelper;
         }
       else