memory leaks in .90 ? app just keeps rising in mb.

StormtrixStormtrix Member Posts: 256
edited November -1 in Working with GS (Mac)
Hey there,
Just curious if anyone else is experiencing the memory just tick up when testing in GS Viewer?
I've got a simple app i'm updating of a 1-card poker game.
I've shrunk the app from it's first release of 52 rules 60 actors or so down to 2 actors, 1 scene and 1 rule for randomizing and displaying a card. peformance is great.

but, when testing in GS Viewer after a show 1 card and hit play again and show the next card memory jumps up by 2mb !! every time.. I've tried getting rid of the 3-4 timers i have, the save /load attributes, even spawnings. I can't seem to figure out how the heck it's jumping up 2 mb.. the card images are only 115k.
I've even got it to destroy the card and respawn the next card thinking it would save on memory.

anyone else have memory problems?
Thanks.

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Spawns and destroys use up memory it doesn't really release it, as does physics and constrains.

    How big are the images? What kind of images are they?
  • StormtrixStormtrix Member Posts: 256
    not using any physics at all or constrains.. images are just a card.. like king of diamonds, etc.. 115k image size
    thx for the reply jon
  • AsymptoteellAsymptoteell Member Posts: 1,362
    I had a ridiculous amount of memory on a project of mine too. It was a lot of pictures, but most of the memory was put under "Other". How about you?
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    From my experience I can tell that "Other" increase with music tracks. But I have no idea what else increase it.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Stormtrix said:
    not using any physics at all or constrains.. images are just a card.. like king of diamonds, etc.. 115k image size
    thx for the reply jon

    how large are the images in size? 100x200? 500x800? did you import them as png or jpg? what is the color depth? 8bit or 24bit?
  • TwistedMechTwistedMech Member Posts: 408
    If you have timers with run to completion set, make sure any timers inside have run to completion off. If the inner timer activity exceeds the outer then the event will still work but memory is not released and it will increase until the app crashes on the device.
  • diegocsdiegocs Member Posts: 531
    kinda out of topic, but why does the ipad start with 30fps in the gamesalad viewr, and the iphone start with 60fps?
  • StormtrixStormtrix Member Posts: 256
    Hey there,
    sorry for the delayed response on info for this (holidays and all) - and really appreciate the help -

    jonmulcahy - The sizes of the cards are 512x768 for retina display and in GS shrunk down to 256x384
    and they are 8bit .png files... i even have used PNG Crusher to bring them down more.
    Regular cards like 2ofhearts (2H) or 7C are only 25k, but a JH, KD are like 120k in size

    Basically when a player touches screen to reveal a card I --

    Timer every .001 (this is to give more randomization instead of just one random(1,52)
    Change attribute: game.RndCard to random(1,52)

    Rule - When touch is pressed
    Change attribute game.card to game.RndCard
    Timer after 1 sec (checked run to completion)
    change attribute self.image to floor(game.Card)..".png"

    then Rule - game.carddisplay = 0 (so if player hits play again change carddisplay to 0)
    destroy this actor

    when they hit play again it'll respawn a new card with above info again.

    so, not sure why in GS Viewer i hit the next card my memory just keeps going up by 2MB in size.
    heck i'll send ya the .gameproj file if you want to look lol... it's always going to be just a free game.

    Thanks again and hope all had a good Christmas
Sign In or Register to comment.