Commit e32c6faa authored by masoomeh's avatar masoomeh

Fixing a memory leak in yui example

parent d2bfd1d8
......@@ -115,6 +115,9 @@ YUI.add('todo-app', function (Y) {
fragment.append(view.render().get('container'));
});
// To delete previously attached views and fix the memory leak.
this.get('container').one('#todo-list').destroy({recursivePurge: true});
this.get('container').one('#todo-list').setContent(fragment);
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment