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 3219368
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:38:15+00:00 2026-05-17T15:38:15+00:00

What is the best using of [super … any method name] . Recently I

  • 0

What is the best using of [super ... any method name]. Recently I have found out that In dealloc the [super dealloc] must stand in the same end. Because any variable what didn’t use before can be filled by garbage if we set it after [super dealloc] It’s a rare thing, but it’s possible. After this we will have crash in our app.

So what is the best using of super method, for example what is best using for -(void)viewWillAppear:(BOOL)animated. Where is the best place for [super viewWillAppear:(BOOL)animated] in the begin of body or in the end?

  • 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-17T15:38:16+00:00Added an answer on May 17, 2026 at 3:38 pm

    The usual rule of thumb is that when you are overriding a method that does some kind of initialization, you call super first and then do your stuff. And when you override some kind of teardown method, you call super last:

    - (void) setupSomething {
        [super setupSomething];
        …
    }
    
    - (void) tearDownSomething {
        …
        [super tearDownSomething];
    }
    

    The first kind are methods like init…, viewWillAppear, viewDidLoad or setUp. The second are things like dealloc, viewDidUnload, viewWillDisappear or tearDown. This is no hard rule, it just follows from the things the methods do.

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

Sidebar

Related Questions

Where I work, people mostly think that objects are best initialised using C++-style construction
What is the best method of using native menus in C#? Edit: I want
I'm using SQL Server 2008. I have a database table that looks like this
Sorry for the super dumb question, but is there any problem using the Android/Eclipse
Which is the best way to implement factory method. 1) A factory method that
I have a Panel that I'm using to display information about a location. I
What is the best using for show loading message when request is performing in
Assume a typical, database and session driven ASP application developed using best practices just
given an xml string like this: <some><nested><xml>value</xml></nested></some> what's the best option (using ruby) to
What's the best practice for using a switch statement vs using an if statement

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.