UITableView and retaining cells
Does a UITableView
instance send a retain message to each of its queued reusable cells?
[The point being I have a custom cell which I want to autorelease
in 开发者_如何学编程a (class) method within the custom cell class.]
Yes, the tableview retains the cells you return in the cellForRowAtIndexPath
method. That's why the cell objects in the default implementation of that method are autoreleased.
How you get the custom cell in the first place? Most likely it's retrieved via the mainBundle's loadNibNamed method which you don't have the responsibility to release it anyway.
精彩评论