• 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: Clarification on accessors? (was: Yet another memory management question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Clarification on accessors? (was: Yet another memory management question)


  • Subject: RE: Clarification on accessors? (was: Yet another memory management question)
  • From: Jeff Laing <email@hidden>
  • Date: Thu, 9 Jul 2009 02:28:11 +0000
  • Acceptlanguage: en-US
  • Thread-topic: Clarification on accessors? (was: Yet another memory management question)

> Because you have no idea what subclassers may do in their overrides of
> the accessors

Sort of invalidates the whole encapsulation promise of OO design, doesn't it?

> (e.g. The subclassed accessor may rely on state that's
> been torn down earlier in -dealloc).

But any subclass that's going to override an accessor has had its dealloc method called already, so it should know to have put back anything that matters.  Now, if you want to design based on the assumption that everyone else will do a crappy job, that's a different story.

> It's just not safe, unless you can guarantee that you own the entire
> inheritance chain.

Someone more knowledgeable than me should bring up the discussion about using the need to use the 'view' set-accessor in dealloc of subclassed view controllers, I think it was.
_______________________________________________

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

  • Follow-Ups:
    • Re: Clarification on accessors? (was: Yet another memory management question)
      • From: Kyle Sluder <email@hidden>
References: 
 >Re: Clarification on accessors? (was: Yet another memory management question) (From: Erik Buck <email@hidden>)
 >Re: Clarification on accessors? (was: Yet another memory management question) (From: Chris Parker <email@hidden>)

  • Prev by Date: link a web page from a view
  • Next by Date: Re: link a web page from a view
  • Previous by thread: Re: Clarification on accessors? (was: Yet another memory management question)
  • Next by thread: Re: Clarification on accessors? (was: Yet another memory management question)
  • Index(es):
    • Date
    • Thread