MCPcopy
hub / github.com/alibaba/lowcode-engine / destroy

Function destroy

packages/engine/src/engine-core.ts:274–286  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

272}
273
274export async function destroy() {
275 // remove all documents
276 const { documents } = project;
277 if (Array.isArray(documents) && documents.length > 0) {
278 documents.forEach(((doc: IPublicModelDocumentModel) => project.removeDocument(doc)));
279 }
280
281 // TODO: delete plugins except for core plugins
282
283 // unmount DOM container, this will trigger React componentWillUnmount lifeCycle,
284 // so necessary cleanups will be done.
285 engineContainer && unmountComponentAtNode(engineContainer);
286}

Callers 2

initFunction · 0.70

Calls 2

forEachMethod · 0.65
removeDocumentMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…