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
7b81bbd5
Unverified
Commit
7b81bbd5
authored
Sep 12, 2022
by
Dan Field
Committed by
GitHub
Sep 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add doc note about when to dispose TextPainter (#111403)
parent
228ea2c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
text_painter.dart
packages/flutter/lib/src/painting/text_painter.dart
+7
-0
No files found.
packages/flutter/lib/src/painting/text_painter.dart
View file @
7b81bbd5
...
...
@@ -168,6 +168,13 @@ class _CaretMetrics {
///
/// 3. Call [paint] as often as desired to paint the paragraph.
///
/// 4. Call [dispose] when the object will no longer be accessed to release
/// native resources. For [TextPainter] objects that are used repeatedly and
/// stored on a [State] or [RenderObject], call [dispose] from
/// [State.dispose] or [RenderObject.dispose] or similar. For [TextPainter]
/// objects that are only used ephemerally, it is safe to immediately dispose
/// them after the last call to methods or properties on the object.
///
/// If the width of the area into which the text is being painted
/// changes, return to step 2. If the text to be painted changes,
/// return to step 1.
...
...
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