• 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: Properties and memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Properties and memory management


  • Subject: Re: Properties and memory management
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 05 Aug 2008 03:00:07 -0700


On Aug 5, 2008, at 2:48 AM, Negm-Awad Amin wrote:

This is the "mirror" of the problem, when you initialize an object. Of course, theoretically in both cases the usage of setters are dangerous. In most cases the deallocation of the object in reverse order to its initialization will not lead to any problems. It is no problem, when you have synthisized accessors, because they have noch side-effects.

No, this is not the case -- Ken's reply was correct. If you use automatic KVO notifications, your accessors will still have side effects.
Again per Ken's reply, you should typically set instance variables directly in init methods, and release them directly in dealloc.


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


  • Follow-Ups:
    • Re: Properties and memory management
      • From: Negm-Awad Amin <email@hidden>
    • Re: Properties and memory management
      • From: mmalc crawford <email@hidden>
References: 
 >Properties and memory management (From: Mike Manzano <email@hidden>)
 >Re: Properties and memory management (From: Jonathan Hess <email@hidden>)
 >Re: Properties and memory management (From: Uli Kusterer <email@hidden>)
 >Re: Properties and memory management (From: "Ken Ferry" <email@hidden>)
 >Re: Properties and memory management (From: Negm-Awad Amin <email@hidden>)

  • Prev by Date: Re: Properties and memory management
  • Next by Date: Re: Properties and memory management
  • Previous by thread: Re: Properties and memory management
  • Next by thread: Re: Properties and memory management
  • Index(es):
    • Date
    • Thread