Eluna::~Eluna() { CloseLua(); delete eventMgr; eventMgr = NULL; }
Eluna::~Eluna() { ASSERT(IsInitialized()); CloseLua(); delete eventMgr; eventMgr = NULL; }
bool CLuaMgr::InitLua( const char *_path ) { CloseLua(); if ( NULL == plua ) { plua = luaL_newstate(); if ( NULL == plua ) { LOG_DEBUG("Error in OpenLua: InitLua() == NULL"); return false; } luaL_openlibs( plua ); AddPathLua( _path ); path = _path; } return true; }
void CScriptEngine::DisableScripting (void) { // Do Lua differently if (L) { CloseLua (); return; } // release engine if (m_IActiveScript) { m_IActiveScript->SetScriptState(SCRIPTSTATE_DISCONNECTED); m_IActiveScript->Close (); m_IActiveScript->Release (); m_IActiveScript = NULL; } // release parser if (m_IActiveScriptParse) { m_IActiveScriptParse->Release (); m_IActiveScriptParse = NULL; } // release site if (m_site) { m_site->Release (); m_site = NULL; } } // end of CScriptEngine::DisableScripting
CLuaMgr::~CLuaMgr() { CloseLua(); }