WPF TextBox Memory Leak???

While running around in the WPF forums, I found this very interesting post… It seems that the WPF TextBox can be dangerous 🙂 – if you do not use it carefully 🙂

Basically the TextBox by default stores all text changes in an Undo Stack… This implies that every time that you change the Text of the TextBox more memory is consumed by the TextBox.

In order to fix this you have to set the UndoLimit property to 0. This would disable the Undo feature for the TextBox and thus NO MORE MEMORY CONSUMPTION

Have a nice day