From: Anthony Geay Date: Fri, 30 Dec 2016 07:37:06 +0000 (+0100) Subject: Let the implementation of singleton as before X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff5cc1c0fec7d3c11f32486f62f8e51abc21fec3;p=modules%2Fgui.git Let the implementation of singleton as before --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index a019d5fb5..37ca6fd0f 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -5145,18 +5145,17 @@ bool LightApp_Application::checkExistingDoc() PyConsole_Interp* LightApp_Application::getPyInterp() { - static PyInterp_Auto 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