##// END OF EJS Templates
Added code that removes the views when a model/widget is closed.
Jonathan Frederic -
Show More
@@ -65,7 +65,9 b' function(WidgetManager, Underscore, Backbone){'
65 65 delete this.comm.model; // Delete ref so GC will collect widget model.
66 66 delete this.comm;
67 67 delete this.model_id; // Delete id from model so widget manager cleans up.
68 // TODO: Handle deletion, like this.destroy(), and delete views, etc.
68 _.each(this.views, function(view, i) {
69 view.remove();
70 });
69 71 },
70 72
71 73 _handle_comm_msg: function (msg) {
General Comments 0
You need to be logged in to leave comments. Login now