Gregory365 / TPF2-Timetables

The Timetable mod for Transport Fever 2
GNU General Public License v3.0
13 stars 5 forks source link

This mod causes a Memory Leak in TPF2 Versions 35905+ #74

Closed MarkMcWire closed 2 weeks ago

MarkMcWire commented 1 month ago

See also -> https://github.com/IncredibleHannes/TPF2-Timetables/issues/103 and -> https://www.transportfever.net/thread/21538-ungew%C3%B6hnlich-hoher-ram-verbrauch-von-tpf2-f%C3%BChrt-zum-absturz-des-spiels-os/

Gregory365 commented 1 month ago

From the provided transportfever.net link, copied here for reference:

LUA "Out of Memory" error likely cause - eis_os

The error can of course also come from an earlier "Out of Memory" and the LUA stack is already broken. Avoid using temporary objects that are only on the stack.

Replace api.bla (api.blub.new()) with:

local blub = api.blub.new()
api.bla (blub)

See #50