Hello all,
I was curious, does C# make an immutable string every time you use the .ToString() method? IE. if you just use it for a message box or to pass to a function? Since immutable strings are difficult for c# to clean up (if it can at all) I would like to use as few actual string objects as possible...I know that for validation for my text boxes I will probably still have to, but I would really like to minimize the wasted memory....the program we are working on is going to run from a server with a LOT of resources, but there are going to be a LOT of users also...and even using like 35 megs or so per instance is going to be pushing it a bit.....so on that note, any other nice memory saving features you guys can think of and offer as advice would be great.
Thanks a lot, you are all great!
Kevin
- "The truth hurts, maybe not as much as jumping on a bicycle with no seat, but it hurts.
I was curious, does C# make an immutable string every time you use the .ToString() method? IE. if you just use it for a message box or to pass to a function? Since immutable strings are difficult for c# to clean up (if it can at all) I would like to use as few actual string objects as possible...I know that for validation for my text boxes I will probably still have to, but I would really like to minimize the wasted memory....the program we are working on is going to run from a server with a LOT of resources, but there are going to be a LOT of users also...and even using like 35 megs or so per instance is going to be pushing it a bit.....so on that note, any other nice memory saving features you guys can think of and offer as advice would be great.
Thanks a lot, you are all great!
Kevin
- "The truth hurts, maybe not as much as jumping on a bicycle with no seat, but it hurts.