• 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: Yet another memory management question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Yet another memory management question


  • Subject: Re: Yet another memory management question
  • From: mmalc Crawford <email@hidden>
  • Date: Sun, 05 Jul 2009 09:08:16 -0700


On Jul 5, 2009, at 8:23 AM, Michael Ash wrote:

It's the same benefit as anywhere else. You have two places,
viewDidUnload and dealloc, which perform the exact same action.

They do not perform the "exact same action".
In dealloc, you obviously relinquish ownership of all objects you own (and perhaps other resources).
In viewDidUnload, you relinquish ownership of only those items that you can recreate later, if the view is loaded again. You typically do not, for example, relinquish ownership of any model objects.


I *personally* suspect I'd find it easier to do a straightforward pass of each method to ensure they're correct rather than having to remember to create/update/check some other non-standard method each time I change the properties. YMMV.

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: 
 >Yet another memory management question (From: DKJ <email@hidden>)
 >Re: Yet another memory management question (From: WT <email@hidden>)
 >Re: Yet another memory management question (From: mmalc Crawford <email@hidden>)
 >Re: Yet another memory management question (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: Wrap to Page method
  • Next by Date: Convenience initialisers
  • Previous by thread: Re: Yet another memory management question
  • Next by thread: EXC_BAD_ACCESS on returning an int?
  • Index(es):
    • Date
    • Thread