* Clean up event listeners
()
| 871 | * Clean up event listeners |
| 872 | */ |
| 873 | destroy(): void { |
| 874 | if (this.scrollRAF !== null) { |
| 875 | cancelAnimationFrame(this.scrollRAF); |
| 876 | } |
| 877 | if (this.measurementRAF !== null) { |
| 878 | cancelAnimationFrame(this.measurementRAF); |
| 879 | } |
| 880 | if (this.resizeObserver) { |
| 881 | this.resizeObserver.disconnect(); |
| 882 | this.resizeObserver = null; |
| 883 | } |
| 884 | this.scrollContainer.removeEventListener("scroll", this.handleScroll); |
| 885 | this.renderedElements.clear(); |
| 886 | this.contentContainer.empty(); |
| 887 | this.itemHeights.clear(); |
| 888 | this.positionCache = []; |
| 889 | this.pendingMeasurements.clear(); |
| 890 | this.invalidatedKeys.clear(); |
| 891 | } |
| 892 | } |
nothing calls this directly
no test coverage detected