简体   繁体   中英

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 ie where i have to release the objects,what are the objects that has to be released and the objects that should not be released.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM