Memory leak problem of window mode
Posted: Mon Dec 24, 2012 5:55 am
I made a sprite gallery and noticed a memory leak problem of showing sprites. The gallery code is really simple:
It just call the screen which has lists of image names, then show sprites using the return values.
The problem is, changing sprites never release caches and it'll soon crash reaching 2GB RAM consumption.
Sprites are composited by im.Composite or LiveComposites. I tried both way but the result is the same.
I tried jump instead of while, or replaced renpy.show as show expression, but no difference.
Image cache is set to 8, but it's ignoring this limit. Only solution is calling renpy.free_memory every time.
Edit: It's probably window mode issue.
Code: Select all
label sprite_gallery:
$config.rollback_enabled = False
while True:
#$ renpy.free_memory()
$ (char,face,pose)=renpy.call_screen("sprite_gallery")
$ renpy.scene()
$ renpy.show("%s %s %s"%(char,face,pose))The problem is, changing sprites never release caches and it'll soon crash reaching 2GB RAM consumption.
Sprites are composited by im.Composite or LiveComposites. I tried both way but the result is the same.
I tried jump instead of while, or replaced renpy.show as show expression, but no difference.
Image cache is set to 8, but it's ignoring this limit. Only solution is calling renpy.free_memory every time.
Edit: It's probably window mode issue.