{"id":1583,"date":"2022-08-30T15:17:44","date_gmt":"2022-08-30T15:17:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/27\/xcode-build-and-analyze-related-questions-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:17:44","modified_gmt":"2022-08-30T15:17:44","slug":"xcode-build-and-analyze-related-questions-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/xcode-build-and-analyze-related-questions-collection-of-common-programming-errors\/","title":{"rendered":"xcode Build and Analyze related questions-Collection of common programming errors"},"content":{"rendered":"<p>I was watching the videos from WWDC 2010 and have now started to dig in to the functionality of the Build and Analyze tool in xcode 3.2. It&#8217;s a great tool that will highlight coding mistakes (specially for a newcomer like me!) even if they may not have an impact during runtime.<\/p>\n<p>But there is one thing I would need some help to understand.<\/p>\n<p>When I push a new view controller with this code:<\/p>\n<pre><code>SettingsViewController *nextController = [[SettingsViewController alloc] initWithNibName:@\"SettingsViewController\" bundle:nil];\n\nMy_AppAppDelegate *delegate = [[UIApplication sharedApplication] delegate];\n\n[delegate.myNavController pushViewController:nextController animated:YES];\n<\/code><\/pre>\n<p>The analyzer tells me there is a potential memory leak. I can understand that in a way, as I allocate the NextController but never release it. But if I try to release it, my app crashes.<\/p>\n<p>I dont get any leaks when analyzing with Instruments on the simulator and physical device.<\/p>\n<p>Would Apple stop this app or would it go through their testing?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-27 11:53:41. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I was watching the videos from WWDC 2010 and have now started to dig in to the functionality of the Build and Analyze tool in xcode 3.2. It&#8217;s a great tool that will highlight coding mistakes (specially for a newcomer like me!) even if they may not have an impact during runtime. But there is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1583","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1583"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1583\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}