Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
04854e8a
Unverified
Commit
04854e8a
authored
Sep 20, 2023
by
Kostia Sokolovskyi
Committed by
GitHub
Sep 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak in _SelectableTextState (#135049)
parent
1bfd6a1f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
124 deletions
+137
-124
selectable_text.dart
packages/flutter/lib/src/material/selectable_text.dart
+1
-0
selectable_text_test.dart
packages/flutter/test/widgets/selectable_text_test.dart
+136
-124
No files found.
packages/flutter/lib/src/material/selectable_text.dart
View file @
04854e8a
...
...
@@ -536,6 +536,7 @@ class _SelectableTextState extends State<SelectableText> implements TextSelectio
super
.
didUpdateWidget
(
oldWidget
);
if
(
widget
.
data
!=
oldWidget
.
data
||
widget
.
textSpan
!=
oldWidget
.
textSpan
)
{
_controller
.
removeListener
(
_onControllerChanged
);
_controller
.
dispose
();
_controller
=
_TextSpanEditingController
(
textSpan:
widget
.
textSpan
??
TextSpan
(
text:
widget
.
data
),
);
...
...
packages/flutter/test/widgets/selectable_text_test.dart
View file @
04854e8a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment