11
Answers

serial port memmory problem

george

george

15y
3.9k
1
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)