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

  • Home
  • SEARCH
  • 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 479875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:50:10+00:00 2026-05-13T00:50:10+00:00

I am using @property(nonatomic, retain) for my IBOutlets for an iPhone application. However, I’m

  • 0

I am using @property(nonatomic, retain) for my IBOutlets for an iPhone application. However, I’m not sure how to make sure I’m managing memory with them properly. The IBOutlets are all set up in Interface Builder, so I’m never calling alloc manually. This means that I’m not sure when and if to deallocate them or when to set them to point to nil.

What are the best practices ensuring that no memory is leaked once the view unloads?

  • 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-13T00:50:10+00:00Added an answer on May 13, 2026 at 12:50 am

    If you use @properties for yourIBOutlets and make the connections in IB then your controller is essentially retaining the IB objedcts with the property and is it therefore responsible for releasing them when it’s done with them.

    When are you done with them?

    In every case you should be setting your properties self.propertyname = nil in your viewDidUnload method and again in dealloc of each viewController.

    It’s quite straight forward, IB manages everything else.

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

Sidebar

Related Questions

Without using Javascript, is there a way to make a CSS property toggle on
.h file UIImage *ownImg; @property (nonatomic, retain) UIImage *ownImg; .m file In viewWillAppear method:
I know that if I retain an IBOutlet by using property then I have
@interface: UIImageView *myImageView; @property (nonatomic, retain) UIImageView *myImageView; @implementation: @synthesize myImageView; - (void)viewDidLoad {
Is it possible in CSS using a property inside an @page to say that
I see little functional difference between using a property public readonly property foo as
I'm animating a UIView's frame property using a CAKeyframeAnimation on the view's CALayer and
In JSP I can reference a bean's property by using the tag ${object.property} Is
I'm trying to get a file with ant, using the get property. I'm running
Using NHibernate ICriteria and adding .AddOrder ... I want to sort by a property

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.