fix: Close unused MessageView when swapping view
Closes https://todo.sr.ht/~sircmpwn/aerc2/379 The old `MessageView` was not closed when replacing the tab content, which causes a memory leak.
This commit is contained in:
parent
f35002ad0e
commit
5b751b6d6d
2 changed files with 7 additions and 1 deletions
widgets
|
@ -317,8 +317,9 @@ func (mv *MessageViewer) NextPart() {
|
|||
mv.Invalidate()
|
||||
}
|
||||
|
||||
func (mv *MessageViewer) Close() {
|
||||
func (mv *MessageViewer) Close() error {
|
||||
mv.switcher.Cleanup()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ps *PartSwitcher) Invalidate() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue