Well, for me it doesn't. According to top, memory keeps growing until VIRT reaches 8,364,896 and RES reaches 7,397g, then VIRT it goes back to 8,340,316 and RES to 7,374g and then it stays in that loop. I have 32 GB in case that's important. So no, for me that's not a memory leak, it just imposes a minimum RAM requirement for the program to work.
It takes a few minutes on my 4gb system. And top doesnt properly show it, i can not explain the behaviour but this code will crash all my systems veryfiying that this code does in fact not release its memory.
Not really. Just adding a line before newFont, like the following, solves the problem:
So youre saying, its not bug because if you use a totally different code it works? I mean, what?
RNavega wrote: ↑Tue May 21, 2024 9:37 pm
Regardless of what people want to call this, it does sound problematic as you have to explicitly call collectgarbage() before the program crashes, which isn't obvious if you expect the garbage collector kicking in on its own after a while.
Yea thats what i am trying to get here at. These lines do not work as we expect lua to work.
Where could this constant font reloading problem happen?
In my case, my text boxes are scaled in a way that their text content stays the same over all its sizes.
So a box has say 10 lines in it regardless of how big the window is.
Now have a dozen of such boxes in a window and you want this window to be able to properly resize it can grow to use a lot memory.
But since normal people do rarely change their window size such error would probably go undected for years.
I cought it because i liked my scaling so much i shook the window like an unwanted baby for half an hour and it rewarded me with a freeze.