Showing images and memory
Posted: Sat Feb 07, 2015 6:06 am
Due to a post in a demo thread for my dungeon crawler I'm currently trying to find out where some unexpected memory usage could come from. Due to my (bad) experiences with garbage collection in other languages I'm wondering if that could be the cause here (the documentation I found about python garbage collection doesn't tell me how good / efficient it is or how often it is normally run ).
So basically what I'm doing is this
1.) I'm loading images from the disk during initialization
2.) Ingame I'm showing the same image at different locations on screen under different tags (but at the beginning I'm using renpy.scene() before beginnign to draw the images)
3.) I'm waiting until the user cliks on an image button (on a screen) or presses a specific key until I go back to 2.)
I'm NOT using gc.collect or anything.
Seemingly the memory allocation varies quite greatly so the question is can point 2 be the cause for it so that point 2 is triggered multiple times without the memory used in between beeing freed again? (thus using up more and more memory instead of about the same amount?)
So basically what I'm doing is this
1.) I'm loading images from the disk during initialization
2.) Ingame I'm showing the same image at different locations on screen under different tags (but at the beginning I'm using renpy.scene() before beginnign to draw the images)
3.) I'm waiting until the user cliks on an image button (on a screen) or presses a specific key until I go back to 2.)
I'm NOT using gc.collect or anything.
Seemingly the memory allocation varies quite greatly so the question is can point 2 be the cause for it so that point 2 is triggered multiple times without the memory used in between beeing freed again? (thus using up more and more memory instead of about the same amount?)