On Feb 5, 2010, at 5:49 PM, Greg Robertson wrote:

> I'm fairly certain I do not have a memory leak it is just that the NSString 
> is very large. Is there anyway to increase the memory allocated or clean up 
> the code to reduce its memory usage?

Use an NSAutoreleasePool (check the docs) inside every iteration of the loop. 
Autoreleased objects don't get freed until the nearest autorelease pool exits, 
and as written that's not going to happen until your method returns, so 
everything that gets allocated in it fills up memory.

—Jens_______________________________________________

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 arch...@mail-archive.com

Reply via email to