Testing tangled. Original: https://github.com/j6t/gitk

gitk: Clear array 'commitinfo' on reload

After a reload we might have an entirely different set of commits,
so keeping all of them leaks memory. Remove them all because
re-creating them is not more expensive than testing wether they're
still valid. Lazy (re-)creation is already well established, so
a missing entry can't cause harm.

Signed-off-by: Markus Hitter <mah@jump-ing.de>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>

authored by

Markus Hitter and committed by
Paul Mackerras
18ae9120 0748f41e

+2 -1
+2 -1
gitk
··· 588 588 proc reloadcommits {} { 589 589 global curview viewcomplete selectedline currentid thickerline 590 590 global showneartags treediffs commitinterest cached_commitrow 591 - global targetid 591 + global targetid commitinfo 592 592 593 593 set selid {} 594 594 if {$selectedline ne {}} { ··· 609 609 getallcommits 610 610 } 611 611 clear_display 612 + unset -nocomplain commitinfo 612 613 unset -nocomplain commitinterest 613 614 unset -nocomplain cached_commitrow 614 615 unset -nocomplain targetid