Memory leaks with images
Posted: Sun Feb 23, 2014 10:42 pm
I'm not experienced with programming with love or/and lua, started doing my first project mostly for educational purposes.
When i checked my program with win task manager, every time I've been reloading images, they were taking more and more RAM. I got mostly no idea how could i repair it, because when I'm trying to add unload() method to scenes where I'd set image to nil, they aren't reloading properly, or doing nothing. Every left click taken ram increases by 20-30 MB. I guess it's because with every reload new instance of image is being created, but I may be wrong. I prefer to read what others have to say since I couldn't create exact question that google would answer me.
When i checked my program with win task manager, every time I've been reloading images, they were taking more and more RAM. I got mostly no idea how could i repair it, because when I'm trying to add unload() method to scenes where I'd set image to nil, they aren't reloading properly, or doing nothing. Every left click taken ram increases by 20-30 MB. I guess it's because with every reload new instance of image is being created, but I may be wrong. I prefer to read what others have to say since I couldn't create exact question that google would answer me.