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


Long-term potential of iPhone/Windows Mobile development platforms

1:

How combine TabBar + Navigation with XCode
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. Best way to manage probably huge photo library with iPhone SDKThe problem is you're doing neither when you fire off your selector like that. How make scrolling function with Interface builder on the iPhone?Your showMyWait should set up the release pool, from NSThread documentation. How programatically move a UIScrollView to focus in a control above keyboard?
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. How much of a transition is programming Java to iPhone apps?Garbage-collected applications did not need to create an autorelease pool.. Best client-side data store for iPhone web app?
How return back info from a child to parent in a NavigationController

2:

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


58 out of 100 based on 18 user ratings 538 reviews

*