Re: Nested AutoRelease Pools Crash
Re: Nested AutoRelease Pools Crash
- Subject: Re: Nested AutoRelease Pools Crash
- From: Clark Cox <email@hidden>
- Date: Sun, 26 Apr 2009 10:04:19 -0700
2009/4/26 Trygve Inda <email@hidden>:
>> - (void)threadMethod:(id)anObject
>> {
>> NSAutoreleasePool* outterPool = [[NSAutoreleasePool alloc] init];
>>
>> NSDictionary* userDefaults = [NSUserDefaults standardUserDefaults]
>> importantValue = [[userDefaults objectForKey:@"myKey"] boolValue];
>>
>> while (1)
>> {
>> NSAutoreleasePool* innerPool = [[NSAutoreleasePool alloc] init];
>
> Hmmm... I changed this to:
>
> NSAutoreleasePool* innerPool;
>
> innerPool = [[NSAutoreleasePool alloc] init];
>
> Since it needs to be re-alloc'd each time, but it still give the same crash.
That changes nothing about your code (i.e. they both do the same thing).
>
> Thread 4 Crashed:
> 0 libobjc.A.dylib 0x9557f688 objc_msgSend + 24
> 1 com.xericdesign.earthdesk.core 0x00008b3c 0x1000 + 31548
> 2 com.apple.Foundation 0x92a0e7ed -[NSThread main] + 45
> 3 com.apple.Foundation 0x92a0e394 __NSThread__main__ + 308
> 4 libSystem.B.dylib 0x90e7b095 _pthread_start + 321
> 5 libSystem.B.dylib 0x90e7af52 thread_start + 34
Well, what message are you sending to what object at
"com.xericdesign.earthdesk.core 0x00008b3c 0x1000 + 31548"?
--
Clark S. Cox III
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden