Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mraheel

macrumors regular
Original poster
Apr 18, 2009
136
0
Hey,

I was trying to load XML in background, but its throwing these things in console. I am using TBXML library to load/parse a file from URL.
ANd if i dont use that, theres a lag, the UI stucks up and until the file is downloaded and parsed, nothing happens. Reminded me of windows.


Code:
-(void)LoadinBack{
	
	[self performSelectorInBackground:@selector(GetData) withObject:nil];	
}
//GetData is the method that fills the array. -(void):GetData;

Code:
Stack: (0x305a2e6f 0x30504682 0x305172e5 0x3055d08b 0x76dc 0x2aeb 0x3050a79d 0x3050a338 0x906fc095 0x906fbf52)
2010-01-16 23:10:42.254 APPx[1889:4103] *** _NSAutoreleaseNoPool(): Object 0xd897e0 of class NSCFData autoreleased with no pool in place - just leaking
Stack: (0x305a2e6f 0x30504682 0x305172e5 0x3055d08b 0x76dc 0x2b1b 0x3050a79d 0x3050a338 0x906fc095 0x906fbf52)
2010-01-16 23:10:42.254 APPx[1889:4103] *** _NSAutoreleaseNoPool(): Object 0xd301c0 of class NSCFString autoreleased with no pool in place - just leaking

anyway way around this..
 
Most likely if you create your own autorelease pool at the start of the background method and release it at the end that will go away but without the code we can't tell for sure.
 
You could also do a detached thread that would allow it to run in the background, however make sure you lock the variables used so the main thread does not release the variables before they are finished in the thread.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.