Large amount of garbage created with most new* functions

Issue #890 resolved
Alex Szpakowski
created an issue

The LÖVE object constructor functions which can take a filename as an argument all call love.filesystem.newFileData in order to get the contents of the file, but they go through Lua to do so, which means the newly created FileData object will stick around at least until it's garbage collected by Lua (which might take a while, since Lua doesn't know about the true size of LÖVE Data objects.)

This can cause a buildup of used memory floating around not doing anything useful for a little while, when a game is first loaded.

Comments (1)

  1. Alex Szpakowski reporter, love.image.newImageData, etc. no longer leave Lua-owned FileData objects floating around waiting to be GC'd when called with filename arguments, resulting in less memory use on startup (resolves issue #890.)

    Moved love.filesystem Lua wrapper code from src/modules/filesystem/physfs/ to src/modules/filesystem/.

    → <<cset 5b0593ce109f>>

  2. Log in to comment