MCPcopy
hub / github.com/opentrace/opentrace / destroy

Method destroy

ui/src/components/pixi/PixiRenderer.ts:526–571  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

524 }
525
526 destroy(): void {
527 this.destroyed = true;
528 this.cancelAnimation?.();
529 if (this.interactionResumeTimer !== null) {
530 clearTimeout(this.interactionResumeTimer);
531 this.interactionResumeTimer = null;
532 }
533 if (this.labelCullDebounceTimer !== null) {
534 clearTimeout(this.labelCullDebounceTimer);
535 this.labelCullDebounceTimer = null;
536 }
537 this.autoFitTarget = null;
538 this.interactionAbort?.abort();
539 this.interactionAbort = null;
540 clearTextureCache(this.textureCache);
541 for (const ping of this.pingNodes.values()) ping.glow.destroy();
542 this.pingNodes.clear();
543 // Pixi's app.destroy({children:true}) recursively destroys all
544 // labels — just drop our refs.
545 this.communityLabels.clear();
546 this.communityAssignments = null;
547 this.communityNames = null;
548 this.nodes.clear();
549 this.nodeArray = [];
550 this.nodeIdToIndex.clear();
551 this.edges = [];
552 this.edgeIndex.clear();
553 this.edgeColorGroups.clear();
554 if (this.app) {
555 try {
556 this.app.destroy(
557 { removeView: true },
558 { children: true, texture: true },
559 );
560 } catch {
561 // Fallback for different Pixi versions
562 try {
563 this.app.destroy(true, { children: true });
564 } catch {
565 /* ignore */
566 }
567 }
568 }
569 this.app = null;
570 this.world = null;
571 }
572
573 // ─── Data ─────────────────────────────────────────────────────────
574

Callers 8

_initMethod · 0.80
applyPingAnimationsMethod · 0.80
triggerPingMethod · 0.80
getCircleTextureFunction · 0.80
getGlowTextureFunction · 0.80
clearTextureCacheFunction · 0.80

Calls 1

clearTextureCacheFunction · 0.90

Tested by

no test coverage detected