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...