嗯,就是内存方面的
UIScrollView* scroll = [[UIScrollView alloc] init]; NSLog(@"scroll retain count 1 is %d", [scroll retainCount]); ControlPanel* cp = [[ControlPanel alloc] init]; NSLog(@"control panel retain count 1 is %d", [cp retainCount]); [scroll addSubview:cp]; NSLog(@"control panel retain count 2 is %d", [cp retainCount]); NSLog(@"scroll retain count 2 is %d", [scroll retainCount]); [scroll release]; NSLog(@"control panel retain count 3 is %d", [cp retainCount]); NSLog(@"scroll retain count 3 is %d", [scroll retainCount]); [cp release]; return NO;