Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / I used instrument to analyze my game, there were about 30 memory leaks.

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 2nd Dec 2011 15:51
Need I pay attention to these memory leaks ? or just ignore it?

such as follows:


The Miracrea Games
Deion
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United States
Posted: 2nd Dec 2011 16:34
you should never ignore memory leaks, its easy to avoid for the most part, its also what is giving ios developers a black eye.. make sure you release objects before allocating new ones. if you aren't sure how to do that then use arc in the latest xcode. which apple had to put in place because of all the bad apps that had major memory leaks.

if your app crashes to much because of memory leaks, or crashes for any reason, you'll get a lot of bad reviews, which will really hurt sales. i know it seems insignificant, but people still run apps with older devices some even jailbreak, so they can update to newer os's then is supported for that device and such..

Cheers,
Deion G.
Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 2nd Dec 2011 17:07
How do you check for memory leaks? Sorry if thats abit vague, I'm relatively new to programming and didn't even know what a memory leak was, I've just googled it and am now interested to see if I have any memory leaks in a few little apps I've created... I guess it would be a good way of seeing if I am coding efficiently... Thank you!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Dec 2011 17:40
I too would like to know Halley? What did you use?

Might be a good way of tracking bugs in AppGameKit as well as our own code...

Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 2nd Dec 2011 19:21
Are we talking about Tier 2 here? Because I didn't think memory leaks were possible in Tier 1 unless there is an error in the AppGameKit player in which case there isn't much we can do about it.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 2nd Dec 2011 21:19
Quote: "Are we talking about Tier 2 here?"

I'm 99% sure we are. The above looks like it's out of Xcode or atleast a tool for iOS/Mac.

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Dec 2011 09:27
Halley does indeed code in tier 2, yes.

My signature is NOT a moderator plaything! Stop changing it!
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 3rd Dec 2011 10:28
The instruments which I use is a tool of Xcode. It's in the same file folder with Xcode 4.2.Analyze memory leaks is just one function of the tool, there are many functions, such as memory allocation, memory leaks, cpu usage, battery consume speed, wifi usage and so on, all aspects about application in the iOS platform.

But I don't know how to fix the memory leaks ,because I can't locate the position in my project.

The Miracrea Games
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 3rd Dec 2011 10:31
@Deion, Thank you. I'll pay attention to it.
@Funnell7, @baxslash, I just use the tool named instruments in Xcode folder.

The Miracrea Games
JavierTF
14
Years of Service
User Offline
Joined: 15th Feb 2010
Location: Going out, to the right
Posted: 4th Dec 2011 13:07
Hello Halley

The only way, for me, is to analyze yourself 'by hand' the source files paying special attention to the objects, if you use, and monitoring that are used and destroyed.

You also have to monitor that if you load any resource, it have to be destroyed after use. It is very easy to overlook this. Especially the resources called several times. It will gradually consume memory if they are not deleted after the call or the use. And if possible, leave the program with a return value of 0.

Among other things.

However, if it is a small app and of short duration, is not a major problem if the memory consumption is not great. At the end of the app the system must clear the memory. (must)

Regards
JavierTF
14
Years of Service
User Offline
Joined: 15th Feb 2010
Location: Going out, to the right
Posted: 5th Dec 2011 20:16
Upps. Sorry Halley. The answer was to Funnell7.

Login to post a reply

Server time is: 2024-05-04 14:36:32
Your offset time is: 2024-05-04 14:36:32