• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)


  • Subject: Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)
  • From: mmalc Crawford <email@hidden>
  • Date: Fri, 20 Feb 2009 01:50:52 -0800


On Feb 20, 2009, at 1:05 AM, Alexander Spohr wrote:

You should therefore also set outlet variables to nil in dealloc:
- (void)dealloc {
	// release outlets and set outlet variables to nil
	[anOutlet release], anOutlet = nil;
	[super dealloc];
}
why not just use
	[self setAnOutlet = nil];
or
	self.anOutlet = nil;

The paragraph above illustrates exactly why you shouldn't do this.

See also, for example, <http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_4_section_4.html#//apple_ref/doc/uid/TP30001163-CH22-SW13 >

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) (From: James Montgomerie <email@hidden>)
 >Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) (From: mmalc Crawford <email@hidden>)
 >Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) (From: mmalc Crawford <email@hidden>)
 >Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) (From: Alexander Spohr <email@hidden>)

  • Prev by Date: RE: Adding Multiple NSWindow or NSPanel into another NSWindow
  • Next by Date: RE: Adding Multiple NSWindow or NSPanel into another NSWindow
  • Previous by thread: Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)
  • Next by thread: Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)
  • Index(es):
    • Date
    • Thread