Here is the code:
My machine has about 710 MB left in the harddrive. When this program runs and "i" variable is at around 20, the functions slows down and eventually stops/crashes. I look at the taskmanager and it shows that the memory usage is at maximum. Is there a way around this?Code:private void button1_Click(object sender, System.EventArgs e) { string s="aaaaaaaaaaT"; for(int i=0;i<1000;i++) { func(ref s); } label1.Text = s; } private void func(ref string s) { s = s + s; }




Reply With Quote