I have created a voice recording app. It works fine on an iPhone 3G but crashes on an original 2G iPhone.
The crash occurs in the following methods:
-(void)RecordbtnPressed:(UIButton *)sender {
[Record removeFromSuperview];
stop.alpha=1;
T=[NSTimer scheduledTimerWithTimeInterval:1 target:self :@selector(startTimer) userInfo:nil repeats:YES];
persistance_Obj->recordClicked=TRUE;
[AudioViewController_Obj startRecording];
}
-(void)StopbtnPressed:(UIButton *)sender {
printf("\n stop pressed");
persistance_Obj->recordClicked=FALSE;
[T invalidate];
T=nil;
[AudioViewController_Obj stopRecording];
MainMenu * obj_RV=[[MainMenu alloc] init];
[self.navigationController pushViewController:obj_RV animated:YES];
[obj_RV release];
}
The crash occurs right when I click the stop button, calling the second method. What could be the cause of this crash?