Skip to content

Commit

Permalink
perf: memory
Browse files Browse the repository at this point in the history
  • Loading branch information
etowahadams committed May 6, 2024
1 parent f0ec117 commit a5a5223
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tracks/gosling-track/gosling-track.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as PIXI from 'pixi.js';
import * as PIXI from 'pixi.js';
import { isEqual, sampleSize, uniqBy } from 'lodash-es';
import type { ScaleLinear } from 'd3-scale';
import type {
Expand Down Expand Up @@ -399,7 +399,8 @@ const factory: PluginTrackFactory<Tile, GoslingTrackOptions> = (HGC, context, op
this.pBackground.clear();
this.pBackground.removeChildren();
this.pBorder.clear();
this.pBorder.removeChildren();
const children = this.pBorder.removeChildren();
children.forEach(c => c.destroy());
this.displayedLegends = [];

// Because a single tile contains one track or multiple tracks overlaid, we draw marks and embellishments
Expand Down

0 comments on commit a5a5223

Please sign in to comment.