Hello all.
In order to try the memory leaks instrument tool, I create a view-based ipad application. It is very simple. I create a default view-based application. In the ViewController's loadView, I say
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
[super loadView];
UIView *view = [[UIView alloc] init];
view.frame = CGRectMake(0, 0, 768, 1004);
view.backgroundColor = [UIColor redColor];
[self.view addSubview:view];
[view removeFromSuperview];
}
So, I create a view inside loadView, then add it to the root view, then remove it.
But the view is created in a method and I never release it.
So I think after loadView finishes, the created view is leaked right?
I used memory leaks instrument tool to check, it reports no leak at all.
Any one could pls explain it why?
thanks