Search found 5 matches
- Thu Dec 13, 2012 6:10 pm
- Forum: Support and Development
- Topic: Garbage Collection not working on ImageData?
- Replies: 8
- Views: 2089
Re: Garbage Collection not working on ImageData?
I have 150 images I want to show in a kind of slideshow. I can't load all images in love.load, because they consume to much memory. Thats why I want to load them at runtime, preferably in a thread. In my real code I don't load one image forever, but different ones at different times and I want the o...
- Thu Dec 13, 2012 5:38 pm
- Forum: Support and Development
- Topic: Some Questions About Love.thread
- Replies: 6
- Views: 2734
Re: Some Questions About Love.thread
Creating a thread always takes some time, so its not useful to create a thread for each pixel. Also since your CPU has probably not more then 4-8 cores it doesn't make sense to create much more then that. The usual way is, you create a few threads and they ask the main thread for a work unit, in you...
- Thu Dec 13, 2012 5:02 pm
- Forum: Support and Development
- Topic: Garbage Collection not working on ImageData?
- Replies: 8
- Views: 2089
Re: Garbage Collection not working on ImageData?
I would have thought, the sleep gives the environment time to do the collection. But if I replace the sleep with something similar it actually works. Nice! Thanks a lot! Now my real question: How to do this in a thread? All thread examples I found use something like while active do update() end so a...
- Thu Dec 13, 2012 3:31 pm
- Forum: Support and Development
- Topic: Garbage Collection not working on ImageData?
- Replies: 8
- Views: 2089
Re: Garbage Collection not working on ImageData?
Then why does function love.update(dt) test = love.image.newImageData("test.jpg") love.timer.sleep(1) end still leak memory? (although much slower of course) As I wrote, my real code is more sane then that. I want to load a huge bunch of images, but need each only for a few seconds but it ...
- Thu Dec 13, 2012 1:59 pm
- Forum: Support and Development
- Topic: Garbage Collection not working on ImageData?
- Replies: 8
- Views: 2089
Garbage Collection not working on ImageData?
I was wondering, why does function love.update(dt) test = love.image.newImageData("test.jpg") end leak memory? I know its no useful code. In my real code I load the images in a thread and only when needed, but it also leaks memory and this is the smallest code I managed to show the problem...