我有简单的View控制器
[.h]
@interface GLViewController : UIViewController <UISplitViewControllerDelegate>{
MGSplitViewController* splitController;
}
-(void)setSplitter: (MGSplitViewController*)splitter;
@end
[.mm]
- (void)loadView
{
GLView* glView = [[GLView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] ];
glView.multipleTouchEnabled = YES;
self.view = glView;
[glView release];
}
- (void)setSplitter: (MGSplitViewController*)splitter
{
splitController = splitter;
}
首先,我初始化并将GLViewController推送到UINavigationController,它被定义为MGSplitController中的详细视图控制器。但是当我弹回我的控制器时,不会调用GLView类的dealloc方法。 GLViewController的dealloc方法中self.view.retainCount的值是7,因此,看起来像是将某个视图对象的引用计数器增加了7,但它有什么用呢?