Hi guys,
Here Im having a doubt that I am having an MasterViewController which doesnot have Superview and I am having labels which was declared globally and also used in different functions. My question is how can I release those labels which are allocated.if I use autorelease then it generating exceptions.
- (id)init {
if(self = [super init]) {
mview = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
//mview.backgroundColor=[UIColor clearColor];
mview.autoresizesSubviews=YES;
tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,220,320,440) style:UITableViewStyleGrouped];
tableView.delegate = self;
tableView.dataSource = self;
tableView.rowHeight = 45;
tableView.backgroundColor = [UIColor clearColor];;
tableView.separatorColor = [UIColor blackColor];
[tableView setSectionHeaderHeight:15];
[tableView setSectionFooterHeight:10];
[mview addSubview:tableView];
}
for example here I declared table view as global how can i release it?Is it possible to release in dealloc.I place a printf statement in dealloc but it was not displaying.
Anyone's help will be appreciated.
Thank you,
Monish Kumar.