is there tool node.js or browser whereby can find out objects hold reference object x?
right using backbone front-end development , though remove views there still seem references them afterwards.
the reason suspect behavior in first place because using plugin/addons backbone debugging in chrome , mozilla.
this make me wonder if perhaps these programs ones holding references backbone objects!
first of all,sadly there no way that. can check calls function , object specific variable holds reference though. it's not because of backbone/node.js javascript itself. when substitute object/array, javascript passes target memory address variable.
but assume it's highly possible reason why having memory leak problem not because of references variables event handlers seen in backbone uses(also knowns "zombie view")
once set events handler in view, need make sure events unset before delete view(.remove()) unless using listento backbone events , this.$el jquery events. because events set via listento , this.$el automatically removed backbone core when remove view. , events set model.on or global jquery$ not so.
so please check whole code whether using .on or global jquery object set events, in case have, replace them listento or this.$el.on or manually unset them before remove them.
Comments
Post a Comment