//------------------------------------------------------------------------------------- void ClientApp::finalise(void) { // 结束通知脚本 PyObject* pyResult = PyObject_CallMethod(getEntryScript().get(), const_cast<char*>("onFinish"), const_cast<char*>("")); if(pyResult != NULL) { Py_DECREF(pyResult); } else { SCRIPT_ERROR_CHECK(); } if(pServerChannel_ && pServerChannel_->pEndPoint()) { pServerChannel_->stopSend(); networkInterface().dispatcher().deregisterReadFileDescriptor(*pServerChannel_->pEndPoint()); networkInterface().deregisterChannel(pServerChannel_); } pServerChannel_->pPacketSender(NULL); SAFE_RELEASE(pTCPPacketSender_); SAFE_RELEASE(pTCPPacketReceiver_); gameTimer_.cancel(); threadPool_.finalise(); ClientObjectBase::finalise(); Network::finalise(); uninstallPyModules(); uninstallPyScript(); }
//------------------------------------------------------------------------------------- void ClientApp::finalise(void) { if(pServerChannel_ && pServerChannel_->endpoint()) getNetworkInterface().deregisterChannel(pServerChannel_); SAFE_RELEASE(pTCPPacketReceiver_); gameTimer_.cancel(); threadPool_.finalise(); ClientObjectBase::finalise(); uninstallPyModules(); uninstallPyScript(); }
//------------------------------------------------------------------------------------- bool ClientApp::uninstallPyScript() { unregisterPyObjectToScript("entities"); return uninstallPyModules() && EntityDef::uninstallScript(); }
bool EntityApp<E>::uninstallPyScript() { return uninstallPyModules() && getScript().uninstall(); }
//------------------------------------------------------------------------------------- bool PythonApp::uninstallPyScript() { return uninstallPyModules() && getScript().uninstall(); }
//------------------------------------------------------------------------------------- bool Bots::uninstallPyScript() { return uninstallPyModules() && getScript().uninstall(); }
//------------------------------------------------------------------------------------- bool PythonApp::uninstallPyScript() { script::PyMemoryStream::uninstallScript(); return uninstallPyModules() && getScript().uninstall(); }