does the app store accept games with leaks?

Member
Posts: 60
Joined: 2009.06
Post: #1
assuming they don't cause any crashes?

related:

I just can't figure out why,using instruments, a a custom class that is shown as released in its history still shows as a leak....
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #2
Sure why not. How are they realistically going to detect them? Also, Safari leaks memory like a sieve, or at least it did not to long ago.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 60
Joined: 2009.06
Post: #3
(Mar 13, 2011 08:30 PM)Skorche Wrote:  Sure why not. How are they realistically going to detect them? Also, Safari leaks memory like a sieve, or at least it did not to long ago.

I assumed that if I can run my app with instruments, so can Apple. Or maybe they have a de-compiler? Blink
Quote this message in a reply
Member
Posts: 33
Joined: 2010.09
Post: #4
Apple do look away if there are tiny leaks. Like 512 bytes per minute is tolerable, or one larger chunk which leaks rarely. If it's eating megabytes per minute I guess the only solution is to track it down, though Wink

There have been Apple classes with minor leaks, I think. I seem to recall one being mentioned as nothing to worry about for one particular version of the OS. I also know of several apps with a few 24-64 byte chunks leaking that got in without problems. Sometimes apps even leak just once (or so says Instruments), and when the OS cleans up it goes away.

And sometimes I suspect Instruments lies…
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #5
Instruments scans your applications entire memory space. Treating every possible value as a pointer because it doesn't actually have any idea what type they really are. When it says it finds a leak, that means that there is no value in your programs memory space that points a block of memory that you've allocated.

However, it doesn't find every leak. You might have an integer or part of a string in your program that looks has the same value as a pointer to a leaked block of memory. Instruments can't help you find that. It can also tell you that you are leaking memory that aren't if you are doing manipulations of your pointers (like tagged pointers or something). If you were doing that, you'd know it though.

Unlike a consistent reproducible crash, memory leaks can be fine. If your program only ever runs for 30 minutes at a time and leaks a few kilobytes per minute, nobody is ever going to notice or care. When you start wasting 100mb over a typical runtime of your program, that is when a few people will start to notice. If you aren't writing an app that is meant to be left open all the time or a library, don't spend hours tracking down every last memory leak.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 60
Joined: 2009.06
Post: #6
cool thanks for the assurances everyone.
I am noticing random crashes after I attempted some cleanup Mad...maybe I should go back to the way things were, it wasn't leaking that much anyway!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Looking for some insight while fixing leaks... agreendev 2 3,092 Sep 28, 2010 11:57 AM
Last Post: agreendev
  Advice on fixing memory leaks petemccabe 4 3,439 Jun 24, 2010 09:19 AM
Last Post: petemccabe
  Leaks program kendric 2 2,792 Jun 16, 2009 08:19 PM
Last Post: kendric
  Leaks in the waterworks. bmantzey 5 3,615 Feb 27, 2009 04:07 PM
Last Post: AnotherJake