开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜