i knew that strings are immutable and that we should use Stringbuilder.
but the method String.Intern(inputString) i didnt know!
- the method looks up the intern string pool for inputString.
- if it founds it, it assigns the reference to thisone.
and it will be not created a new instance of the inputString.
consider memory consumption vs. performance !!!
we have more the performance problem than the memory consumption problem.
Link: Bob On Development » Optimize Memory Consumption Using String Interning
String.Intern() Method
Labels: .NET
Latest Posts
Popular Posts
-
I am *very* keen on automating tests, so I was looking into unit testing a WCF service. If I say "unit test", I mean a fast ,...
-
It's easy I thought, just select the Property of the EntityType and set the Default Value in the Properties window to: DateTime.Now ...
-
*Updated* 26. September 2010: Updated with comments from Adam Cogan *Updated* 27. September 2010: Updated the comparison between anonymo...
No comments:
Post a Comment