
Why can't I use [y release] at the end of function?
- (void)functionused

NSTimer *)timer
{
[password resignFirstResponder];
mainViewController* y=[[mainViewController alloc]initWithNibName:@"mainViewController" bundle:nil];
UIView *currentView = (UIView *)[timer userInfo];
for ( UIView *subview in [self.view.superview subviews] ) {
if ((subview.tag != 14)) {
[subview removeFromSuperview];
}
}
[currentView.superview addSubview:[y view]];
//[y release];
}