RetainVsCopy

Here's a simple guide for retain or copy. Use retain when the object represents a relationship. Use copy when the object represents a value. The difference is this: in a relationship, if the object pointed to changes, you want your variable to reflect this change of state; whereas, with a value, you want the value to remain unaltered if the original object changes unless you explicitly alter your copy.

Enviar um comentário

About This Blog

  © Blogger template Shush by Ourblogtemplates.com 2009

Back to TOP