MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / destroy

Method destroy

src/utils/VirtualScroller.ts:873–891  ·  view source on GitHub ↗

* Clean up event listeners

()

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 2

disconnectMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected