Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Images loading into memory get loaded again

Author
Message
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 18th Aug 2020 00:40 Edited at: 18th Aug 2020 00:41
Ok so while I load each level I'm deleting everything. I'm not deleting 9 images as there objects collected. So for some reason it's storing the same 9 images into memory after every load. I can't delete them unless the game items are used. How do I tell my program to dump memory at each load?

The problem is the memory as images loaded keeps adding to it's self making my memory to large.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 18th Aug 2020 02:26
DeleteAllImages()
DeleteAllSprites()
DeleteAllText()
DeleteAllObjects()
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 19th Aug 2020 07:29
i load all images into an array. then each time i load a new image i check the array for the name of the image if it is found it does not load and just references the id of the already loaded image.

Login to post a reply

Server time is: 2024-04-26 06:43:43
Your offset time is: 2024-04-26 06:43:43