MrMage
MrMage

Reputation: 7496

Memory behavior of / Possible memory leak in UITableView

I am profiling my iPhone application with the 'Activity Monitor' Instrument. When I use UITableViews and scroll through them, I see the memory usage of my application go up all the time while I scroll. When I return to the previous view and the UITableViewController gets deallocated, the memory usage goes down a bit, but not to where it was previously. But the 'Leaks' instrument does not find any memory leaks, and neither does the static analyzer find some. I also ensured that there are never more than 12 UITableViewCells allocated at any time, so those are re-used properly (the Cells are also created with an appropriate autorelease so they will be de-allocated when unused). I'm also pretty sure that I don't have any memory leaks built into the code of the corresponding UITableViewController.

Is this normal behavior, e.g. will the application release the memory it has claimed at a later time, maybe when it is needed somewhere else?

Cheers and thanks in advance

MrMage

Upvotes: 1

Views: 450

Answers (1)

nall
nall

Reputation: 16149

Do you have NSZombieEnabled? I've seen this cause "incorrect" results in Instruments memory profiling since those instances will hang around.

Upvotes: 3

Related Questions