Page 1 of 1

How to release the memory??

Posted: Wed Jul 30, 2014 7:10 am
by findook
How can I release the memory load a Image??

Re: How to release the memory??

Posted: Wed Jul 30, 2014 11:00 am
by Zer0
You phrased that very bad.
[wiki]love.graphics.newImage[/wiki]
If you want to LOAD a new image.
[wiki]love.graphics.draw[/wiki]
If you want to DRAW an image.

http://lua-users.org/wiki/GarbageCollectionTutorial
collectgarbage is used to free memory but it should never be called because it's an expensive operation and it's done automatically, if you have a memory leak I advise you to fix it by not creating new tables every fram and reusing old tables.