Monday, May 3, 2010

Mike Ash: Dealing with Retain Cycles

Itt van az egesz.

"Apple's memory management guidelines state that when two objects have a parent-child relationship, the parent should retain the child. If the child needs a reference back to the parent, that reference should be an unretained, weak reference. This allows the parent to be deallocated, which can then release its reference to the child, avoiding a cycle."

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.