]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Let the implementation of singleton as before
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 30 Dec 2016 07:37:06 +0000 (08:37 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 30 Dec 2016 07:37:06 +0000 (08:37 +0100)
src/LightApp/LightApp_Application.cxx

index a019d5fb552d970f9208dfe1dcca8cb414439111..37ca6fd0f769c8d0acde36547ff6f8d4556b7233 100644 (file)
@@ -5145,18 +5145,17 @@ bool LightApp_Application::checkExistingDoc()
 
 PyConsole_Interp* LightApp_Application::getPyInterp()
 {
-  static PyInterp_Auto<PyConsole_Interp> myInterp;
-  if ( myInterp.isNull() ) {
+  static PyConsole_Interp* myInterp = 0;
+  if ( !myInterp ) {
     myInterp = createPyInterp();
     myInterp->initialize();
-    myInterp->incrRef();// In Light application the PyConsole_Interp cannot been destroy. Why ?
   }
   return myInterp;
 }
 
 PyConsole_Interp* LightApp_Application::createPyInterp()
 {
-  return new PyConsole_Interp;
+  return new PyConsole_Interp();
 }
 
 #endif // DISABLE_PYCONSOLE