@interface Rectangle
@property (retain) UIView *view;
@end
@implementation Rectangle
CGRect frame = CGMakeRect();
self.view = [[UIView alloc] initWithFrame:frame]
Student *student=[[Student alloc]init];
[student release]; // not using this but using dealloc on it see below
- (void) dealloc { [_view release]; [super dealloc]; [student dealloc]; }@end
My question is: here why we have to deallocate the memory on super object ???? what happen if we deallocate the memory on student with release it?????