RenderParagraph should dispose instances of SelectableFragments. (#133915)
This commit is contained in:
parent
c9f70e9fd2
commit
af1b7494d8
@ -437,9 +437,7 @@ class RenderParagraph extends RenderBox with ContainerRenderObjectMixin<RenderBo
|
||||
@override
|
||||
void dispose() {
|
||||
_removeSelectionRegistrarSubscription();
|
||||
// _lastSelectableFragments may hold references to this RenderParagraph.
|
||||
// Release them manually to avoid retain cycles.
|
||||
_lastSelectableFragments = null;
|
||||
_disposeSelectableFragments();
|
||||
_textPainter.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
@ -1684,7 +1684,7 @@ void main() {
|
||||
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
|
||||
});
|
||||
|
||||
testWidgets('ElevatedButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async {
|
||||
testWidgetsWithLeakTracking('ElevatedButton in SelectionArea changes mouse cursor when hovered', (WidgetTester tester) async {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/104595.
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
home: SelectionArea(
|
||||
|
Loading…
x
Reference in New Issue
Block a user