Skip navigation.
 
mlFwd: NSSpellChecker crashes after 64k words
FROM : Denis Stanton
DATE : Wed Apr 13 22:36:08 2005

Hi Evan

With advice from this list I added NSAutoreleasePool * pool = 
[[NSAutoreleasePool alloc] init]; and [pool release]; to each level of 
my nested loops, and at the same time increased the nesting to four 
levels.

I ran the app last night for 12 hours on a 2 x 2 GB XServe.  I had to 
switch it off after 76,468,325 iterations through NSSpellChecker.  I 
think I can safely say that with proper auto releasing NSSpellChecker 
does not impose any artificial limits on use.

Thanks for contributing time to my little project.

Denis

Begin forwarded message:

> From: Denis Stanton <<email_removed>>
> Date: April 14, 2005 7:03:03 AM
> To: Denis Stanton <<email_removed>>
> Subject: Fwd: NSSpellChecker crashes after 64k words
>
>
>
> Begin forwarded message:
>

>> From: Evan DiBiase <<email_removed>>
>> Date: 13 April 2005 3:41:20 AM
>> To: <email_removed>
>> Subject: Re: NSSpellChecker crashes after 64k words
>>
>> On Apr 12, 2005, at 11:07 AM, The Karl Adam wrote:
>>

>>> Have you tried this with code that just creates auto-released 
>>> objects?

>>
>> I whipped up a sample program to test this:
>>
>> #import <Foundation/Foundation.h>
>>
>> int main (int argc, const char * argv[]) {
>>    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>>     NSString *s;
>>     int i;
>>     
>>     for (i = 0; true; i++) {
>>         s = [NSString stringWithString:@"<email_removed>"];
>>         NSLog(@"%d", i);
>>     }
>>     
>>    [pool release];
>>    return 0;
>> }
>>
>> It's still going strong at 200,000 strings created. I'll keep it 
>> running for a while, though, and if it crashes I'll let the list 
>> know.
>>
>> Evan _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list      (<email_removed>)
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/
>> <email_removed>
>>
>> This email sent to <email_removed>

> Denis Stanton
> <email_removed>
> Home:  (09) 533 0391
> mobile: 021 1433622
>

Denis Stanton
Orcon Internet Limited
(09) 480 9299
http://www.orcon.net.nz

Related mailsAuthorDate
No related mails found.