Skip to content

Commit 1619b0c

Browse files
committed
compose: Add a controller.dispose call that we forgot
We do this at the other sites where there's an existing controller that we want to replace with a new one. I suppose this fixes a small memory leak; I just noticed it from reading code, not from profiling or anything.
1 parent 550f99c commit 1619b0c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/widgets/compose_box.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
19891989
final store = PerAccountStoreWidget.of(context);
19901990
final outboxMessage = store.takeOutboxMessage(localMessageId);
19911991
setState(() {
1992+
this.controller.dispose();
19921993
_setNewController(store);
19931994
final controller = this.controller;
19941995
controller

0 commit comments

Comments
 (0)