Why my UTableView with style UITableViewStyleGrouped is consuming memory?
Posted
by prathumca
on Stack Overflow
See other posts from Stack Overflow
or by prathumca
Published on 2010-04-02T12:32:48Z
Indexed on
2010/04/02
12:33 UTC
Read the original article
Hit count: 385
Hello everyone,
Currently in my app, I'm using an UITableView with style UITableViewStyleGrouped as shown below.
CGRect imgFrame = CGRectMake(0, 0, 320, 650);
UITableView *myTable = [[UITableView alloc] initWithFrame:imgFrame style:UITableViewStyleGrouped];
myTable.dataSource = self;
myTable.delegate = self; //make the current object the event handler for view
[self.view addSubview:myTable];
[myTable release];
And the data has stored in an array "dataArray". dataArray has collection of arrays, where each array represent a section. Currently I have only one section with 100 records. When I installed my app onto my IPhone, I observed that this UITableView is consuming 20 MB of IPhone memory. If I changed the table view style to "UITableViewStylePlain", then it is consuming only 4MB of memory.
I'm trying to figure it out, where is the exact problem, but not.
What was wrong with "UITableViewStyleGrouped"?
Regards, prathumca.
© Stack Overflow or respective owner