I am getting out of memory alert in this function, called `500K` times:

```
public void DoStuff(string msg)
{
     rtfTerminal.Invoke(new EventHandler(delegate
            {
                rtfTerminal.SelectedText = string.Empty;
                rtfTerminal.AppendText(msg);
                rtfTerminal.ScrollToCaret();

            }));

}

```

In the global scope I declared:

```
  private System.Windows.Forms.RichTextBox rtfTerminal;

```

* I guess I get the out of memory since I do `new EventHandler` each
call, How can I avoid that?
* Is it reasonable that I get the out of memory due to
`rtfTerminal.AppendText(msg);`?