should we need to release viewcontroller's object after pushing into navigation controller?
صفحه اصلي

should we need to release viewcontroller's object after pushing into navigation controller?



here is sample code.

if(MyPageViewControllerObj==nil) 	{ 		MyPageViewController *vController = [[MyPageViewController alloc] initWithNibName:@"MyPageView" bundle:[NSBundle mainBundle]]; 		self.MyPageViewControllerObj=vController; 		[vController release]; 		noOfWrongAnswers=0; 		noOfRightAnswers=0; 	} 	MyPageViewControllerObj.sessionid=sessionid; 	MyPageViewControllerObj.categoryID = categoryId; 	MyPageViewControllerObj.flashcardIdforcount = flashcardid; 	MyPageViewControllerObj.categoryType=categoryType; 	MyPageViewControllerObj.indexViewControllerobj=self; 	[self.navigationController pushViewController:MyPageViewControllerObj animated:YES]; 

do i need to write this line **[MyPageViewControllerObj release]**

after pushing it into navigation controller.and also in dealloc method...


Casting NSString to unsigned char *

1:

Adding left button to UINavigationBar (iPhone)
Yes, you should to release your MyPageViewControllerObj as the UINavigationController retains it. What's the best way to parse RSS/Atom feeds for an iPhone application?It does not need to be in the -dealloc method.. What is the difference between an iPhone web app and an iPhone app?
Responding to touchesBegan in UIPickerView instead of UIView

68 out of 100 based on 63 user ratings 778 reviews