Sankar Chandra Bose
Sankar Chandra Bose

Reputation: 377

iPhone app crashes at the mid of running or during launch

I have an issue in my application. My iPhone application crashes at mid of running or during the application launch at times both in iPhone and simulator.

I know that memory management is not proper or is it because of some other reasons.

My application is using a web service that pulls the data and displays it in the view, the web service is working properly because i see the data coming from the web service into my app.

Can anybody suggest how to manage memory properly i.e. where i have to release the objects,what are the objects that has to be released and the objects that should not be released.

Upvotes: 0

Views: 129

Answers (2)

Pripyat
Pripyat

Reputation: 2937

Sometimes an iPhone app crashes if you put too much code into init or applicationDidFinishLaunching. This has happened to me when I put too many download queries into applicationDidFinishLaunching and the app simply quit after a while while never showing my interface because it was simply overloaded with tasks. Try moving all the webcode into a separate selector and then calling performSelector:@selector(loadMyWebCode) withObject:nil afterDelay:1] into applicationDidFinishLaunching, then it should work.

Upvotes: 0

phi
phi

Reputation: 10733

You can start by reading Apple's Memory Management Programming Guide and this article might also be helpful.

If you can provide some code that might be causing you problems, you should share it here for further assistance.

Upvotes: 1

Related Questions