Hi folks,
I tested this little script here on my Ipod touch, compiled with the 2.2.1 SDK:
SETCURRENTDIR("Media") // seperate media and binaries?
maxstars% = 100
sprTitle% = 1
sprTeam% = 2
sprGFX% = 3
DIM stars[maxstars][2]
setup_stars()
LIMITFPS 20
draw_screen()
END
FUNCTION draw_screen:
WHILE TRUE
FOR i% = 1 TO maxstars
SETPIXEL stars[i%-1][0],stars[i%-1][1],RGB(0,0,RND(100)+155)
NEXT
SHOWSCREEN
WEND
ENDFUNCTION
FUNCTION setup_stars:
FOR i% = 1 TO maxstars
stars[i%-1][0] = RND(480)
stars[i%-1][1] = RND(320)
NEXT
ENDFUNCTION
When I started with the LEAK Instrument, it reports a leak after around 10-14 seconds, and when I close the app via the home button.
Any ideas? Do have to worry about these leaks?
Cheers
Michael
Any more details about the leak?
Usually all GLBasic commands should not leak, thus it must be something internal.
Interessant.... das der kram ?berhaupt linkt unter 2.2.1...
Gernot schreib mal ab OS 3.0 ran.
Quote from: Kitty Hello on 2009-Aug-27
Any more details about the leak?
Usually all GLBasic commands should not leak, thus it must be something internal.
What do you need, the LEAK tool gives tons of Info.
post it.
To lazy to do it now. I thought you would able to replicate it when you create a project yourself with the code I posted above.
But that is no problem Gernot. Trucidare allready said that GLB is only for SDK 3.0. So just forget about it. Everything is just fine. Thank you for spending time on this.
Just for info. I ran it using OS 3.0 (as its all I have on my machine) and I only had one very minor leak of about 114 bytes. This spike happened at the start of the process and then the remaining 7 minutes that I ran the test everything was fine.
Yep, i think its from the startup code of the glbasic engine. 2 leaks in init code. but not sure.
Ah. I print the device ID before iPhoneMain. No memory pool is allocated that's why.
Just ignore it, it's 14 bytes.
I get also a memory leak when an app is closed.
post the output, please.
Hi gernot,
I will post something from LEAK as soon as possible. I am very busy with non glb related stuff.
Michael
Ok, here are the output screenshots of the LEAK instrument.
[attachment deleted by admin]