|
-
Jul 28th, 2009, 11:52 PM
#6
Re: Running Out Of Memory
11,000!! No wonder there's a problem. How big are your files? If a file is 1 kilobyte then after processing one file you'll have used 11 megabytes of memory just to store all the strings.
You might try using a StringBuilder instead of a String. I've never actually used StringBuilder.Replace but StringBuilders are generally more efficient than Strings when joining multiple substrings together so I'd guess that they would be when replacing substrings too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|