At 7:50 AM -0400 7/22/08, Kyle Sluder wrote:
On Mon, Jul 21, 2008 at 5:02 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
NSString* csvString = [NSString stringWithContentsOfURL: lookupURL
encoding: NSUTF8StringEncoding error: &lookupError];
This line right here requires an autorelease pool. Have you created
one for your thread?
It's apparent that you have a memory management issue somewhere in
your code. Can you post more context?
--Kyle Sluder
kyle,
thanx for the reply. yes, i do have an autorelease pool in place. i
agree that it looks like some kind of memory management problem. the
"bothersome" aspect is that this code used to work without any
problems. and yes, i know thread problems aren't always reproducible,
but the code has been in use problem free for sometime, probably
going back as far as 10.5.3 or earlier. but i can't figure out what
CFURL/NSURL is causing the problem. i'm not sure exactly what
additional code is worth posting. given (what i believe is the
relavent code):
NSURL* lookupURL = [[NSURL alloc] initWithString: urlLookupString];
NSError* lookupError = nil;
NSString* csvString = [NSString stringWithContentsOfURL:
lookupURL encoding: NSUTF8StringEncoding error: &lookupError];
...
[lookupURL release];
the error occurs during the processing of stringWithContentsOfURL; i
would assume that it would retain the passed in url as long as it
needs it; and i retain it (alloc init) before making the call and
don't release the url until after my call to stringWithContentsOfURL.
ken
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]