Shoebox memory leak

Previous topic - Next topic

Ian Price

Gernot, would it be possible to add memory commands, something like GETMEMFREE, GETTOTALMEM,GETMEMUSED etc. to establish if/when/how much memory is being used, rather than using external tools like Task Manager?
I came. I saw. I played.

Crivens

That could be quite cool. The Xcode memory analyser is pretty good but it would be nice to have something inside the app itself too

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

I would have to count that and it would make the program run a lot slower then. I have no idea how to get the used memory for cross platforms otherwise.

Crivens

Ok, so I tested the same project in Windows making sure that I only have the shoebox for media, and yes it totally memory leaks all over the place here too, but if I remove the shoebox and reintroduce my media it is stable and does not leak.

So it isn't just the iPhone. Hopefully this means it is a simple fix?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

please send me the project!

Crivens

The project is a bit large so I've made a simple small version which loads 2 png files. It shows the problem though.

Just run it as it is and you should find task manager shows it steady at around 12mb (now and again goes lower but I assume that is Windows catching when you are clearing the sprite memory). Now rename the png files to something else and run again. It will now use the shoebox and you should see the memory being used up very quickly.

Hope that helps!

Cheers


[attachment deleted by admin]
Current fave quote: Cause you like musicians and I like people with boobs.

Dark Schneider

Could you test it for SOUNDS and the other branch, media$?.

Crivens

I'll see if I get a chance later. Got some chores to do! I know that when I used shoebox on the iphone originally I couldn't get wavs to play and had to store them separately. And that was with using the other branch too.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

No, there was not a single memory leak!







... there were TWO in one function. I'm so sorry. I'll pack that in the next update, which will be a big one.

Crivens

Excellent :) Nice one Gernot, you are the man!

Cheers

Current fave quote: Cause you like musicians and I like people with boobs.

AlienMenace

If the next update isn't out soon then is there any chance we can get this fix before then? Also, does this fix also address the issues people are having using shoebox with sound files?

Thank you.
Apps published: 3

Kitty Hello

The problem is, that I changed a real lot already.

You "might" want the beta? http://www.glbasic.com/beta/glbasic_sdk.exe

MrTAToad


Crivens

Oooh, Beta shinyness.... Hmm, dunno though. Any idea of when it will be out of beta? Obviously can't give definite dates, but are we talking days, weeks, or (say it ain't so!) months?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

when it's done ?

No, I have no idea, yet. I hope it will be quick, but there's some issues with Android that have to be sorted before.