* Destroy and cleanup
()
| 153 | * Destroy and cleanup |
| 154 | */ |
| 155 | destroy() { |
| 156 | if (this.rafId) { |
| 157 | cancelAnimationFrame(this.rafId); |
| 158 | this.rafId = null; |
| 159 | } |
| 160 | this.container.removeEventListener("scroll", this.onScrollBound); |
| 161 | this.topSpacer.remove(); |
| 162 | this.bottomSpacer.remove(); |
| 163 | this.itemContainer.remove(); |
| 164 | this.pool = []; |
| 165 | this.items = []; |
| 166 | } |
| 167 | } |