HomeWildfire Games

Encapsulate runtime creation.


Encapsulate runtime creation.

  • Makes it easier to change down the line (and change is coming)
  • Allows making g_ScriptRuntime thread-local easily.
  • Remove ParentRuntime, which is not used at the moment.

Part of the SM52 migration, stage: SM45 compatible.

Patch by: Itms

Tested By: Freagarach

Refs #4893

Differential Revision: https://code.wildfiregames.com/D3087

Event Timeline

vladislavbelov added inline comments.

Why it should be shared_ptr if it's thread_local?


Sounds like a workaround, should be fixed.


That's the unsafe creation of std::shared_ptr, should be std::make_shared instead.

wraitii added inline comments.Nov 13 2020, 3:17 PM

As you write below, this is more or less a workaround. I plan to fix it downstream.