views:

192

answers:

2

I have some memory leak in my app which yet I cannot figure out why. If I release those objects the app crashes. Is it a problem to approve my app by apple?

+1  A: 

If your application crashes then it probably won't be approved.

RaYell
If the app crashes, they won't aprove it. But if there are memory leaks that do no harm (no crashes etc) then apple will aprove the app most likely...
dododedodonl
If the app has memory leaks it's only a matter of time when it crashes.
RaYell
+5  A: 

The answer to your original question is "Yes", Apple will approve it, as long as they don't test it long enough for the app to run out of memory. They spend very little time testing apps, so you're probably going to get by them.

I disagree with the commenter who said that you've got no business writing code if you can't fix a memory leak. I agree that we should aim for flawless code, but the reality is that this is a business decision you need to make for yourself. There are a number of factors that weigh in this decision, and a "perfect" app is not necessarily the best money making app.

Relevant to your decision:

  1. How big is the leak?
  2. How often will your users encounter it? If it's a leak in a table cell with 100 rows, then you've got a big problem. If it's a leak in a preferences screen then you can probably fix it later, because the typical user will only hit it once in a while.
  3. What is the cost in delaying launch of your app in order to fix the memory leak? Compare that with the cost of fixing the leak.
  4. If there is a substantial risk that more than 1/1000 people will run out of memory due to your leak, then you really will want to fix it. Those people will give you enough 1-star reviews to hurt your ratings.

Finally, I definitely recommend posting your leaky code to StackOverflow as a separate question.

Chris Garrett