History

use deleteLater for ESS script engine on nodeKilled

Stephen Birarda committed 9 years ago

Commit 20022eb1 parent e7a90631 file · +2 −1Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+2−1
@@ -395,7 +395,8 @@ void EntityScriptServer::selectAudioFormat(const QString& selectedCodecName) { · 394 unmodified lines
395 395
396void EntityScriptServer::resetEntitiesScriptEngine() {396void EntityScriptServer::resetEntitiesScriptEngine() {
397 auto engineName = QString("about:Entities %1").arg(++_entitiesScriptEngineCount);397 auto engineName = QString("about:Entities %1").arg(++_entitiesScriptEngineCount);
398 auto newEngine = QSharedPointer<ScriptEngine>(new ScriptEngine(ScriptEngine::ENTITY_SERVER_SCRIPT, NO_SCRIPT, engineName));398 auto newEngine = QSharedPointer<ScriptEngine>(new ScriptEngine(ScriptEngine::ENTITY_SERVER_SCRIPT, NO_SCRIPT, engineName),
399 &ScriptEngine::deleteLater);
399 400
400 auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor);401 auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor);
401 newEngine->globalObject().setProperty("WebSocketServer", webSocketServerConstructorValue);402 newEngine->globalObject().setProperty("WebSocketServer", webSocketServerConstructorValue);