Monday, November 23, 2009

iPhone dev Stupidity 102: Do you have to release IBOutlet?

from stackoverflow:

Your IBOutlets are probably @properties. If they are, and you have retain as an attribute, then you do need to release in -dealloc

A best practice: 

self.myoutlet = nil; in dealloc

This works for both the retained and assigned IBOutlet. The retained will release and the assigned will do nothing.


No comments: