MCPcopy Create free account
hub / github.com/TanStack/db / dispose

Method dispose

packages/offline-transactions/src/OfflineExecutor.ts:598–622  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

596 }
597
598 dispose(): void {
599 for (const collection of Object.values(this.config.collections)) {
600 collection.deferDataRefresh = null
601 }
602
603 if (this.unsubscribeOnline) {
604 this.unsubscribeOnline()
605 this.unsubscribeOnline = null
606 }
607
608 if (this.unsubscribeLeadership) {
609 this.unsubscribeLeadership()
610 this.unsubscribeLeadership = null
611 }
612
613 if (this.leaderElection) {
614 this.leaderElection.releaseLeadership()
615
616 if (`dispose` in this.leaderElection) {
617 ;(this.leaderElection as any).dispose()
618 }
619 }
620
621 this.onlineDetector.dispose()
622 }
623}
624
625export function startOfflineExecutor(config: OfflineConfig): OfflineExecutor {

Callers

nothing calls this directly

Calls 2

valuesMethod · 0.45
releaseLeadershipMethod · 0.45

Tested by

no test coverage detected