snappymail/dev/Component/Abstract.js

15 lines
233 B
JavaScript
Raw Normal View History

2016-10-19 01:52:43 +08:00
export class AbstractComponent {
constructor() {
this.disposable = [];
}
2015-11-15 08:23:16 +08:00
dispose() {
2015-11-19 01:32:29 +08:00
this.disposable.forEach((funcToDispose) => {
2019-07-05 03:19:24 +08:00
if (funcToDispose && funcToDispose.dispose) {
2015-11-15 08:23:16 +08:00
funcToDispose.dispose();
}
});
}
}