SWORD25: Fix leaking the lua state MemoryWriteStreamDynamic buffer

This commit is contained in:
Bastien Bouclet 2017-09-20 19:21:42 +02:00
parent 9c2cfee4e5
commit ddac55699d

View File

@ -395,7 +395,7 @@ bool LuaScriptEngine::persist(OutputPersistenceBlock &writer) {
lua_getglobal(_state, "_G");
// Lua persists and stores the data in a WriteStream
Common::MemoryWriteStreamDynamic writeStream;
Common::MemoryWriteStreamDynamic writeStream(DisposeAfterUse::YES);
Lua::persistLua(_state, &writeStream);
// Persistenzdaten in den Writer schreiben.