I am detaching a new thread
[NSThread detachNewThreadSelector:@selector(loadAvatar) toTarget:self withObject:nil];
I am getting an EXC_BAD_ACCESS on
STObject* st = [cellitem get:@"stobject"];
In my following method
-(void)loadAvatar
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
STObject* st = [cellitem get:@"stobject"];
//do stuff...
[pool release];
}
I have tried retaining st but no luck. When I run this code without detaching a new thread I have no problems. I am not really sure what I am missing.
UPDATE cellitem is a subclass of NSObject that contains some properties such as a dictionary and strings.
The get method basically returns a string from a dictionary