MCPcopy Create free account
hub / github.com/apitable/apitable / destroy

Method destroy

packages/widget-sdk/src/resource/service.ts:122–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120 }
121
122 destroy() {
123 if (!this.initialized) {
124 return;
125 }
126 this.initialized = false;
127
128 this.roomService &&
129 Array.from(this.roomService.collaEngineMap.values()).forEach((engine) => {
130 this.reset(engine.resourceId);
131 });
132
133 this.socket && this.socket.removeAllListeners();
134 this.socket && this.socket.close();
135 this.unBindBeforeUnload();
136 this.store.dispatch(StoreActions.setConnected(false));
137 this.resourceStashManager.destroy();
138 }
139
140 private static getResourceFetchAction(resourceType: ResourceType): any {
141 switch (resourceType) {

Callers 1

switchRoomMethod · 0.95

Calls 7

resetMethod · 0.95
unBindBeforeUnloadMethod · 0.95
setConnectedMethod · 0.80
closeMethod · 0.65
destroyMethod · 0.65
forEachMethod · 0.45
dispatchMethod · 0.45

Tested by

no test coverage detected