wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

Memory leak in TextBox #149

Closed asthomas closed 9 years ago

asthomas commented 9 years ago

When the content of a TextBox changes, the previous content is added to the TextProxy.$$undo member. There is no upper bound on the size of the $$undo array, so a long-lived TextBox that encounters many changes will grow memory forever.

In some cases, undo behaviour is not necessary. It would be nice to be able to explicitly disable undo tracking on the TextBox, or limit it to a single prior value to allow the user to press escape while editing the value.

BSick7 commented 9 years ago

This is definitely an unintended bug. There is a max history size that is being ignored.

BSick7 commented 9 years ago

Fixing in textbox-history-limit branch. Still need to add tests before merging into master. EDIT: issue-149 branch.

BSick7 commented 9 years ago

Fixed in v0.16.44.

BSick7 commented 9 years ago

Added "undo disable" as enhancement #151