semms fix the memory issue
This commit is contained in:
commit
2950259ede
@ -106,7 +106,7 @@ LuaContext LuaRoot::createContext(StringList const& scriptPaths) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
newContext.set("loadstring", m_luaEngine->createFunction([newContext](String const& source, Maybe<String> const& name, Maybe<LuaValue> const& env) -> LuaFunction {
|
newContext.set("loadstring", m_luaEngine->createFunction([&newContext](String const& source, Maybe<String> const& name, Maybe<LuaValue> const& env) -> LuaFunction {
|
||||||
String functionName = name ? strf("loadstring: {}", *name) : "loadstring";
|
String functionName = name ? strf("loadstring: {}", *name) : "loadstring";
|
||||||
return newContext.engine().createFunctionFromSource(newContext.handleIndex(), source.utf8Ptr(), source.utf8Size(), functionName.utf8Ptr());
|
return newContext.engine().createFunctionFromSource(newContext.handleIndex(), source.utf8Ptr(), source.utf8Size(), functionName.utf8Ptr());
|
||||||
}));
|
}));
|
||||||
|
@ -81,7 +81,7 @@ int main(int argc, char** argv) {
|
|||||||
lastReport = Time::monotonicTime();
|
lastReport = Time::monotonicTime();
|
||||||
coutf("[{}] {}s | FPS: {} | Entities: {}\n", j, Time::monotonicTime() - start, fps, entityCount);
|
coutf("[{}] {}s | FPS: {} | Entities: {}\n", j, Time::monotonicTime() - start, fps, entityCount);
|
||||||
}
|
}
|
||||||
worldServer.update();
|
worldServer.update(ServerGlobalTimestep * GlobalTimescale);
|
||||||
}
|
}
|
||||||
double totalTime = Time::monotonicTime() - start;
|
double totalTime = Time::monotonicTime() - start;
|
||||||
coutf("Finished run of running dungeon world '{}' with seed {} for {} steps in {} seconds, average FPS: {}\n",
|
coutf("Finished run of running dungeon world '{}' with seed {} for {} steps in {} seconds, average FPS: {}\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user