Closed zeligon closed 9 years ago
this is how we used to do with backbone, I guess marko widgets is missing to remove the this
reference it self.
destroy: function(){
//COMPLETELY UNBIND THE VIEW
this.undelegateEvents();
this.$el.removeData().unbind();
//Remove view from DOM
this.remove();
Backbone.View.prototype.remove.call(this);
}
There is not enough information to act on this issue. In the marko-widgets@>3.0
we dropped the this.widgets
collection so no cleanup is required. In the marko-widgets@<3.0
we do remove widgets out of the this.widgets
collection using the following code:
https://github.com/raptorjs/marko-widgets/blob/5658cae45a85ccc5bbae4849c09a847bd687f392/lib/Widget.js#L59-L64
Can you please provide more details?
Doing some house cleaning. If this is still an issue please let me know, but I'm going to go ahead and close it.
assign the widget to NULL after the widget has been destroyed.