all. i have test codes as below:
- (void)viewDidLoad
{
[super viewDidLoad];
[NSThread detachNewThreadSelector:@selector(test) toTarget:self withObject:nil];
}
-(void)test
{
MyClass *obj = [[[MyClass alloc] init] autorelease];
NSLog(@"%@",[my description]);
}
i create a autorelease object in NSThread's method but no user-created autoreleasepool. when NSThread exit,obj just dealloced(i have a breakpoint int method delloc). why? dose NSThread create it's own autoreleasepool by itself?