Hi all,
I'm fairly new here and utilizing this very useful forum, have managed to put together a very simple match-3 game. It works well enough, except for a memory leak. Even if I play the same level, the memory creeps up. When I exit the game level and I go back to the menu level, I never completely get back the memory occupied by the game level.
I'd be very grateful for any help to figure this out.
So these are the steps I've already taken to prevent a leak -
1)Removing all children before removing the parent sprite.
2) Pausing gtween after it is completed, so it can be garbage collected.
3) I've removed references to objects before removing them.
So what else can I do remove this leak? I haven't used any advanced features like box2d.
Thanks.
Comments
Likes: Apollo14
Fragmenter - animated loop machine and IKONOMIKON - the memory game
the more messages you output, the more memory is involved
ps\\ https://wiki.giderosmobile.com/index.php/Profiling
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Dislikes: Yan
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://wiki.giderosmobile.com/index.php/Profiling
Likes: sam_m
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: Apollo14, sam_m
Pls let us know what caused leak (I guess you'll find it with BhLeaky class), it's interesting.
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@hgy29 - Using leaky.lua now. Thanks for the link.
"*** OBJECT SNAPSHOT message here ***
SceneManager has 1 instances
GTween has 6 instances
*** OBJECT SNAPSHOT END ****
I think Gtween is the problem as the number of instances increases as the game progresses. This has completely stumped me as I thought I was removing gtween instances properly. Curious thing is that most of the gtween instances are getting removed except for a few. This is how I'm using gtween -
Likes: sam_m
Likes: MoKaLux
Likes: keszegh, Apollo14
Likes: sam_m
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Thank you so much for taking an interest in my issue and helping me out. Gideros has the nicest community I've ever encountered.
Likes: MoKaLux, talis