收录日期:2020/11/30 16:06:56 时间:2010-09-07 20:17:03 标签:iphone,ios,uitableview

I'm wondering if the cache of UITableview cells is cleared when a UITableViewController (or subclass) receives a memory warning.

I have a subview in some cells and I'd like to know if it's safe to release them on a memory warning.

It is an implementation detail that is not known (or I must have missed it) - and it might change from version to version.

If you implement your custom table view cells correctly and use proper memory management (i.e. release your ivars in dealloc), then it really should not matter at all.

If you have references to those subviews elsewhere, this can get very tricky anyway, as you shouldn't assume the cell coming from the cache or not anyway.