I create UITableview and cells programmatically. When i create cell objects, does it store in stack memory? Does it store in stack for each cell objects i create? I want to optimize the code, so wanted to know it technically whats happening behind when creating table view cells through program.
Please advise!
Thank you.
All objects in Objective-C are created in the heap.
Use the standard method of dequeuing reusable cells and the system will
efficiently reuse them instead of allocating new ones when cells go off
the screen and new cells enter.
Here is a link to Apple’s documentation:
http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewCells/TableViewCells.html#//apple_ref/doc/uid/TP40007451-CH7-SW1