Re: Simple memory problem
Re: Simple memory problem
- Subject: Re: Simple memory problem
- From: Graham Cox <email@hidden>
- Date: Fri, 6 Feb 2009 11:23:34 +1100
On 6 Feb 2009, at 11:16 am, Shawn Erickson wrote:
Since inputString is large you really should avoid causing it to be
copied over and over again
I agree wholeheartedly, the autorelease pool "solution" is a sticking
plaster on a gaping wound. A better approach is to avoid the need for
it in the first place. I'd also say that this looks like a O(n^2)
operation which might be slow given the file sizes you mentioned. If
this is being run on the main thread you might need to give some
thought to keeping your app responsive, maybe by breaking this down
into shorter chunks (or shunt this off onto another thread - it looks
like a reasonable candidate).
--Graham
_______________________________________________
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