SHowing Activity Indicator View Using Thread Shows This Error in gdb?


SHowing Activity Indicator View Using Thread Shows This Error in gdb?



i m using this on uitableviewcell's didselectrow method

[NSThread detachNewThreadSelector:@selector(showMyWaitView) toTarget:self withObject:nil]; 

it works fine but it shows error in gdb like this

2009-08-10 12:45:01.313 FlashCards[1209:6307] * _NSAutoreleaseNoPool(): Object 0x458200 of class UIView autoreleased with no pool in place - just leaking Stack: (0x907d7adf 0x906e41f2 0x29a6 0x906eabad 0x906ea754 0x93e2d6f5 0x93e2d5b2) 2009-08-10 12:45:01.314 FlashCards[1209:6307] * _NSAutoreleaseNoPool(): Object 0x2a0e8 of class NSCFString autoreleased with no pool in place - just leaking Stack: (0x907d7adf 0x906e41f2 0x30ad10b0 0x30ad12e6 0x29c5 0x906eabad 0x906ea754 0x93e2d6f5 0x93e2d5b2)

i have also tried timer but that didn't work

my Timer Code is This

MyTimer = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(showMyWaitView) userInfo:nil repeats:NO]; [[NSRunLoop mainRunLoop] addTimer:MyTimer forMode: NSDefaultRunLoopMode];

i have also tried this

MyTimer = [NSTimer scheduledTimerWithTimeInterval:0.0001 target:self selector:@selector(showMyWaitView) userInfo:nil repeats:NO]; 

[NSThread sleepForTimeInterval:0.03];

and this is my showMyWaitView method

-(void)showMyWaitView { [self.view addSubview:MyWaitViewObj.view]; } 

here is my did selectrow method

  if(MyWaitViewObj==nil) { 	MyWaitViewObj = [[MyWaitViewController alloc] initWithNibName:@"MyWaitView" bundle:nil]; }  //MyTimer = [NSTimer scheduledTimerWithTimeInterval:0.0001 target:self selector:@selector(showMyWaitView) userInfo:nil repeats:NO];  MyTimer = [NSTimer timerWithTimeInterval:0.01 target:self selector:@selector(showMyWaitView) userInfo:nil repeats:NO]; [[NSRunLoop mainRunLoop] addTimer:MyTimer forMode: NSDefaultRunLoopMode]; [NSThread detachNewThreadSelector:@selector(showMyWaitView) toTarget:self withObject:nil]; //[NSThread sleepForTimeInterval:0.03];  [indexTableView deselectRowAtIndexPath:indexPath animated:YES]; categoryId = [[listOfCategoryId objectAtIndex:indexPath.section] intValue]; categoryType=[[listOfCategoryType objectAtIndex:indexPath.section] intValue]; [self getFlashCard:categoryId]; flashcardid = [[flashCardsId objectAtIndex:indexPath.row] intValue]; //NSLog(@"%s %d %s", __FILE__, __LINE__, __PRETTY_FUNCTION__, __FUNCTION__); 	if(MyPageViewControllerObj==nil) 	{ 		MyPageViewController *vController= [[MyPageViewController alloc] initWithNibName:@"MyPageView" bundle:[NSBundle mainBundle]]; 		self.MyPageViewControllerObj=vController; 		[vController release]; 	}   //  	MyPageViewControllerObj.sessionid=sessionid; 	MyPageViewControllerObj.categoryID = categoryId; 	MyPageViewControllerObj.flashcardIdforcount = flashcardid; 	MyPageViewControllerObj.categoryType=categoryType; 	MyPageViewControllerObj.indexViewControllerobj=self; 	[self.navigationController pushViewController:MyPageViewControllerObj animated:YES]; 	[MyPageViewControllerObj refreshMyPageView]; 	//[MyPageViewControllerObj release]; 	NSLog(@"My MySlidingController View Ka retain Count=%d",[MyPageViewControllerObj retainCount]); [MyWaitViewObj.view removeFromSuperview]; 

how do i show activity indicator using timer please help me or tell me will this gdb error cause application crash


SubViewTwoController undeclared (first use in this function) (obj-c)

1:

UITableView+UINavigationBar+UITabbar in windows based application template using interface Builder?
If you're setting up a Thread, you need to set up the run loop and create an NSAutoreleasePool for this thread as well, which is released when the Thread exits. Core Data: Quickest way to delete all instances of an entityThe problem is you're doing neither when you fire off your selector like that. Is there a portable OpenGL UI Library (Buttons, Lists, Windows, Dropdown etc)?Your showMyWait should set up the release pool, from NSThread documentation. Downloading images from a server iPhone SDK
For non garbage-collected applications, the method aSelector is responsible for setting up an autorelease pool for the newly detached thread and freeing this pool before it exits. iPhone touch cancelling in OS 3.0Garbage-collected applications did not need to create an autorelease pool.. UIPasteboard - cannot copy text
Websites for the iPhone - but what about other platforms?

2:

All UI updates must be made on the main thread..


78 out of 100 based on 43 user ratings 638 reviews