Skip to content

Commit 3c57567

Browse files
committed
Merge branch 'master' of https://github.com/Aides359/angular-fusioncharts into core-fix/memory-leak-issue
2 parents b4db9e6 + e629edf commit 3c57567

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/angular-fusioncharts.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,12 @@
474474

475475
createFCChart();
476476

477+
scope.$on('$destroy', function () {
478+
// on destroy free used resources to avoid memory leaks
479+
if (chart && chart.dispose) {
480+
chart.dispose();
481+
}
482+
});
477483
}
478484
};
479485
}]);

0 commit comments

Comments
 (0)