Browse Source

fixed memory leak because eventlisteners weren't destroyed (#3728)

develop
lennartboeckx 7 years ago
committed by Yotam Berkowitz
parent
commit
3884998f3b
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      lib/timeline/Core.js
  2. +2
    -0
      lib/timeline/component/ItemSet.js

+ 1
- 0
lib/timeline/Core.js View File

@ -527,6 +527,7 @@ Core.prototype.destroy = function () {
}
}
this.listeners = null;
this.hammer && this.hammer.destroy();
this.hammer = null;
// give all components the opportunity to cleanup

+ 2
- 0
lib/timeline/component/ItemSet.js View File

@ -483,6 +483,8 @@ ItemSet.prototype.destroy = function() {
this.setItems(null);
this.setGroups(null);
this.hammer && this.hammer.destroy();
this.groupHammer && this.groupHammer.destroy();
this.hammer = null;
this.body = null;

Loading…
Cancel
Save