Re: Memory Management question
Re: Memory Management question
- Subject: Re: Memory Management question
- From: Robert Marini <email@hidden>
- Date: Fri, 26 Dec 2008 14:10:09 -0500
Yes, you can.
This simply leads to voodoo programming where retains and releases
are sprinkled throughout your code as a substitute for
understanding. In addition to deferring absorbtion of the Basic
Rules, it's almost certainly going to lead to a problem at some
stage when you retain and release rather than using accessor methods
(see <http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html#//apple_ref/doc/uid/TP40004447-SW4
>).
Indeed, many would find their lives a great deal easier if they went
through accessor methods, but they don't. It's the same issue that
arises when developers post questions who's answers would be self-
evident if they were adhering to MVC but are fairly complicated given
the lack of clarity in the code's design. The takeaway from that
should be to use properties but people are stubborn (though I would
maintain that overkill retaining/releasing, so long as they are
balanced, is very unlikely to lead to problems - just ugly, dirty,
semi-retarded code that you can look back on and cringe at in a few
years).
-rob.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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