From ff5cc1c0fec7d3c11f32486f62f8e51abc21fec3 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 30 Dec 2016 08:37:06 +0100 Subject: [PATCH] Let the implementation of singleton as before --- src/LightApp/LightApp_Application.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.39.2