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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:05:21+00:00 2026-05-19T01:05:21+00:00

In my UIViewController subclass, I have 3 UIView ‘s with each a @property as

  • 0

In my UIViewController subclass, I have 3 UIView‘s with each a @property as an IBOutlet. I do not use these properties at all in my code. The views get instantiated as soon as the view controller is created and they are deallocated when the view controller is deallocated.

I was thinking; can’t I just remove the @property‘s? I did, and I could still connect my instance variables (with IBOutlet) in Interface Builder.

So my question now is; is there any use for properties in combination with Interface Builder, or is it OK to leave them out? Is it required for some memory management or something? Or are they really just for use in your own code?

And if I do leave them out, do I still need to release them in dealloc?

  • 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-19T01:05:21+00:00Added an answer on May 19, 2026 at 1:05 am

    They’re not necessary, but they’re strongly encouraged for the simple fact that they clarify memory management.

    For example, if you declare an outlet via the ivar, then what is its retain policy? Is it retained? Is it autoreleased? Are you the owner? Does someone else also own it? There is a lot of ambiguity there (especially with those accursed top level objects, which behave differently on the Mac than on the iPhone).

    On the other hand, if you declare the outlet via a property, there is no ambiguity, because the memory management policy is directly stated in the declaration. In addition with the presence of the property, the nib unarchiving will see the setter and use that, thereby ensuring that nothing strange is going on with transferring object ownership, etc.

    In a nutshell, you can declare outlets without using @property (which we all had to do before they were introduced in 10.5), but there’s no good reason to not use them. They really make the code a lot clearer as to what exactly is going on.

    For more info on the absurdity of nib object memory management, check out this page in the documentation.

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

Sidebar

Related Questions

I have a custom UIView subclass without a corresponding UIViewController. I use this class
I have a UIViewController subclass to control a UIView that I want to add
I have a subclass of UIViewController which handles a UIView. The viewcontroller is presented
Suppose I have a UIViewController subclass that takes care of some UIViews. These UIViews
I have a UIView subclass that draws a simple rectangle with this code: -
I have an application with 5 UIViewController s each inside a corresponding UINavigationController ,
I have a UINavigationController containing an UIViewController initialized with a UIView. The UINavigationController also
I have written a subclass of UIViewController which creates a view programmatically, instead of
I have a very simple subclass of UIViewController : @interface RoastChickenViewController : UIViewController {
I recently discovered that UIView s should only have UIViewController s when they fill

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.