ioBroker / ioBroker.example

Template adapter for ioBroker
44 stars 73 forks source link

Potential Memoryleak #62

Closed oweitman closed 4 years ago

oweitman commented 4 years ago

https://github.com/ioBroker/ioBroker.template/blob/9ab757f8f72d429c38bf9ea33529d83260073ca4/JavaScriptVIS/widgets/template/js/template.js#L47

If the widget is recreated or redrawn by vis the previous bounds are not automaticly deleted by vis/canJS and leads to a memory leak redraw/recreation is triggered for example if you use binding. the bound states should manually unbound with the unbind command or should added to the data('bound') property of the widget. data('bindHandler') should also set example: iframe widget of the basic set https://github.com/ioBroker/ioBroker.vis/blob/2a08ee6da626a65b9d0b42b8679563e74272bfc6/www/widgets/basic.html#L380