History

Clean up entity script engine deletion

Zach Pomerantz committed 10 years ago

Commit f40fe881 parent 2cc788f3 files · +18 −15Browse files

Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 3 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngines.cpp+4−2
@@ -158,8 +158,10 @@ void ScriptEngines::shutdownScripting() { · 157 unmodified lines
158 // and stop. We can safely short circuit this because we know we're in the "quitting" process158 // and stop. We can safely short circuit this because we know we're in the "quitting" process
159 scriptEngine->disconnect(this);159 scriptEngine->disconnect(this);
160 160
161 // Calling stop on the script engine will set it's internal _isFinished state to true, and result161 // If this is an entity script, we need to unload any entities
162 // in the ScriptEngine gracefully ending it's run() method.162 scriptEngine->unloadAllEntityScripts();
163
164 // Gracefully stop the engine's scripting thread
163 scriptEngine->stop();165 scriptEngine->stop();
164 166
165 // We need to wait for the engine to be done running before we proceed, because we don't167 // We need to wait for the engine to be done running before we proceed, because we don't