Skip to content

Commit 340bb39

Browse files
authored
Reduce peak memory use (#278)
Reduce peak memory use
2 parents 53c5a3b + 976cc36 commit 340bb39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SCRIPTS/BF/ui.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ local function invalidatePages()
7474
Page = nil
7575
currentState = pageStatus.display
7676
saveTS = 0
77+
collectgarbage()
7778
end
7879

7980
local function rebootFc()
@@ -434,7 +435,7 @@ function run_ui(event)
434435
end
435436
local attr = (menuLine == i and INVERS or 0)
436437
if event == EVT_VIRTUAL_ENTER and attr == INVERS then
437-
Page = assert(loadScript(SCRIPT_HOME.."/Pages/"..PageFiles[i].script))()
438+
invalidatePages()
438439
currentPage = i
439440
currentState = pageStatus.display
440441
end

0 commit comments

Comments
 (0)