Topic: Bug: ZIPE not freeing up memory / closing stream after usage?

Hi!

In my "Pocket Radio Player" I have a memory leak when I use the stream functions of your module a lot.
It also seems that the zip file is still "locked", even when I already have opened another one.

Example line:
ButtoIco_stop:TIconstrip=LoadIconStrip("zipe::skins\"+filename+"::prp_stop.png")

Is there a way to force the wrapper to close the stream / zip file and free the memory allocated?
The bmx Garbage Collector doesn't help here at all.

Thanks.

Grisu

Re: Bug: ZIPE not freeing up memory / closing stream after usage?

greetings smile  i didnt see anything right away that would be an issue.  is it possible to whip up a bare-minimum example that i could run?

Re: Bug: ZIPE not freeing up memory / closing stream after usage?

Here's a quick example.

Just read out an image of a zip file constantly and the task mananger memory usage will go up like crazy while the GC Collector stays the same?

I have already posted that issue in the BMX bug forum. But no one could help so far.

If you have any idea or wild guess, please let me know.

Framework brl.Jpgloader
Import brl.PNGloader
Import brl.Pixmap
Import gman.zipengine

SuperStrict 

Global MinMemUsage:Long=GCMemAlloced()
Global MaxMemUsage:Long=GCMemAlloced()
Global TempMemUsage:Long=0

While True <> False ' Endless loop!

Local ButtoIco_exit:TPixmap=LoadPixmap("zipe::skins\prp_red_win7.skn::prp_about.png")  ' Just an ordinary image file
TempMemUsage:Long=GCMemAlloced() 
If TempMemUsage > MaxMemUsage Then MaxMemUsage=tempMemUsage

Print "Min: "+MinMemUsage
Print "Max: "+MaxMemUsage
Print ""
Delay (10) ' free a little CPU time

Wend
End

Re: Bug: ZIPE not freeing up memory / closing stream after usage?

thank you.  that will help me troubleshoot.  unforutnately i wont be able to look at this again for another 12 hours or so.  will look at it as soon as i can.

Re: Bug: ZIPE not freeing up memory / closing stream after usage?

I have to thank you.

Take all the time you need.

Re: Bug: ZIPE not freeing up memory / closing stream after usage?

Re: Bug: ZIPE not freeing up memory / closing stream after usage?

Re: Bug: ZIPE not freeing up memory / closing stream after usage?