Remove ScriptContext::CreateContext

This function nudges one into using it instead of the constructor. Even
though a `std::shared_ptr` isn't required.
This commit is contained in:
phosit
2025-06-04 08:02:00 +02:00
parent 5daae13525
commit 13453a3c7b
7 changed files with 13 additions and 24 deletions
+1 -1
View File
@@ -555,7 +555,7 @@ bool Init(const CmdLineArgs& args, int flags)
// their own threads and also their own contexts.
const int contextSize = 384 * 1024 * 1024;
const int heapGrowthBytesGCTrigger = 12 * 1024 * 1024;
g_ScriptContext = ScriptContext::CreateContext(contextSize, heapGrowthBytesGCTrigger);
g_ScriptContext = std::make_shared<ScriptContext>(contextSize, heapGrowthBytesGCTrigger);
// On the first Init (INIT_MODS), check for command-line arguments
// or use the default mods from the config and enable those.