Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6619607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:59:28+00:00 2026-05-25T20:59:28+00:00

I have a project that I created by using Xcode’s Single View Application template.

  • 0

I have a project that I created by using Xcode’s Single View Application template. Obviously, it comes with a view controller and an app delegate file. Everything works fine. I just wanted to use Xcode’s Analyze tool for the first time to make sure everything is fine before submitting to the App store. I get the potential leak error for the following lines of code in the app delegate:

self.viewController = [[myViewController alloc] initWithNibName:@"myViewController"     bundle:nil]; 
self.window.rootViewController = self.viewController;

Full app delegate is as follows:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.viewController = [[myViewController alloc] initWithNibName:@"myViewController" bundle:nil]; 
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;
}

I didn’t modify the app delegate myself. I am using whatever the template gave me. Do I need to release something somewhere in the app delegate? If so, what? and in which method of app delegate?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:59:28+00:00Added an answer on May 25, 2026 at 8:59 pm

    Nothing needs to be released in the application delegate since the app is terminating and the OS will recover all resources. Indeed, it is improbably that dealloc will even be called.

    See SO link for more information.

    If you need to do cleanup when the app quits, use applicationWillTerminate:.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created an empty Single View application using Xcode 4.2 on OSX Lion 10.7.2
I have created an xcode project. Now I want to give .app file to
I have an application that was originally created compatible with iOS 2.x. With Xcode
I created a project in xcode 4.2 using the feature of storyboard. I have
I have a big project that was first created in Borland C++ 6. We're
I have created a small flash CS4 project that has a few custom components
I have created a new method in one of the project's controllers that it
I have a new project which is an iPhone application. for that I have
I'm creating my first iPhone application (using XCode 4), and I initially created the
I have created a new project in Xcode and performed the following to add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.