diff options
author | Ray Ganardi <ray@ganardi.xyz> | 2020-04-16 19:29:36 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-04-20 10:48:40 -0400 |
commit | 5b751b6d6df3445fc66d87256bca1f089825f17a (patch) | |
tree | 6f138ff41274b60e65860f7acb7991bdb6f4a7bc /widgets | |
parent | f35002ad0e1fae9c62e598b229e32b16a8eb702c (diff) | |
download | aerc-5b751b6d6df3445fc66d87256bca1f089825f17a.tar.gz |
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.
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/msgviewer.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 35fc4b6e..e192ae6a 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -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() { |