Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all
Unified · Split
| @@ -395,7 +395,8 @@ void EntityScriptServer::selectAudioFormat(const QString& selectedCodecName) { · 394 unmodified lines | ||
| 395 | 395 | |
| 396 | 396 | void EntityScriptServer::resetEntitiesScriptEngine() { |
| 397 | 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 | 401 | auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor); |
| 401 | 402 | newEngine->globalObject().setProperty("WebSocketServer", webSocketServerConstructorValue); |