george

george

  • NA
  • 23
  • 46.2k

serial port memmory problem

Nov 24 2008 12:49 PM
guys i have make some other post before few months! i cand find solution please help me if someone know any solution!!

 im reading with serial port from a micro controller board and i have a problem!
the program works OK but the memory usage increasing! begins with 13mb and goes to 100mb in an hour

i have try to use
System.GC.Collect();
System.GC.WaitForPendingFinalizers();


in the


private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{


RxString = serialPort1.ReadLine();

this.Invoke(new EventHandler(DisplayText));
System.GC.Collect();
System.GC.WaitForPendingFinalizers();



}


but still nothing!! any idea?

Answers (11)