• 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: Crash when closing window from the menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash when closing window from the menu


  • Subject: Re: Crash when closing window from the menu
  • From: Andre Masse <email@hidden>
  • Date: Mon, 01 Dec 2008 09:21:01 -0500

Ah! Didn't know that.

Thanks a lot,

Andre Masse


On Dec 1, 2008, at 09:12, Jean-Daniel Dupas wrote:

When you dealloc a datasource, a delegate or any other object that is not retained by class that uses it, you have to unregister it.
For example, if you have an object that is datasource for its _tableView ivar and delegate for _otherIVar ivar, you should do something like this :


- (void)dealloc {
	[_tableView setDataSource:nil];
	[_otherIVar setDelegate:nil];
	// other dealloc stuff
	[super dealloc];
}

You should also remove it from notification center if it is registered as observer, etc.

Not that all this stuff is useless in Garbage collected app, and should not be duplicate in finalize.

_______________________________________________

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: 
 >Crash when closing window from the menu (From: Andre Masse <email@hidden>)
 >Re: Crash when closing window from the menu (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Crash when closing window from the menu
  • Next by Date: Re: Crash when closing window from the menu
  • Previous by thread: Re: Crash when closing window from the menu
  • Next by thread: Re: Crash when closing window from the menu
  • Index(es):
    • Date
    • Thread