Memory is not getting free'd
Posted: Sun Apr 06, 2014 2:31 pm
Hi everyone,
I'm not sure if I'm doing something wrong or if this is how it's supposed to be.
I was experimenting loading a big image, and then loading a different one into the same variable. I expected that the memory stayed about the same, but it increased. If i repeat the process, even with the same image, the memory goes on increasing forever.
I made this short piece of code to illustrate this: http://hastebin.com/yororoxoyu.lua
Even by setting the var to nil, the memory doesn't get lower.
If I keep repeating it, eventually the game and love crash when the memory usage reaches 100%.
In this example I used ImageData just to make sure the problem wasn't only with newImage itself.
tips?
thanks
I'm not sure if I'm doing something wrong or if this is how it's supposed to be.
I was experimenting loading a big image, and then loading a different one into the same variable. I expected that the memory stayed about the same, but it increased. If i repeat the process, even with the same image, the memory goes on increasing forever.
I made this short piece of code to illustrate this: http://hastebin.com/yororoxoyu.lua
Even by setting the var to nil, the memory doesn't get lower.
If I keep repeating it, eventually the game and love crash when the memory usage reaches 100%.
In this example I used ImageData just to make sure the problem wasn't only with newImage itself.
tips?
thanks