Skip to content

Commit 225b0f5

Browse files
committed
fix a memory leak, courtesy of @brk (and gemini!)
1 parent d27ded8 commit 225b0f5

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# GG Changelog
22

3+
## Unreleased
4+
5+
### Fixed
6+
- Memory leak in the log pane (thanks to @brk).
7+
38
## [0.29.1](releases/tag/v0.29.1)
49

510
### Added

src/GraphLog.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
</script>
8686

8787
<svg class="graph" style="width: 100%; height: {graphHeight}px;">
88-
{#each visibleSlice.rows as row}
89-
{#key row}
88+
{#each visibleSlice.rows as row, i}
89+
{#key row?.revision.id.commit.hex ?? i}
9090
<g transform="translate({(row?.location[0] ?? 0) * columnWidth} {(row?.location[1] ?? 0) * rowHeight})">
9191
<foreignObject
9292
class:placeholder={row === null}
@@ -103,8 +103,8 @@
103103
{/key}
104104
{/each}
105105

106-
{#each visibleSlice.rows as row}
107-
{#key row}
106+
{#each visibleSlice.rows as row, i}
107+
{#key row?.revision.id.commit.hex ?? i}
108108
{#each distinctLines(visibleSlice.keys, row) as line}
109109
<GraphLine {line} />
110110
{/each}

0 commit comments

Comments
 (0)