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
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_removeSelectionRegistrarSubscription();
|
_removeSelectionRegistrarSubscription();
|
||||||
// _lastSelectableFragments may hold references to this RenderParagraph.
|
_disposeSelectableFragments();
|
||||||
// Release them manually to avoid retain cycles.
|
|
||||||
_lastSelectableFragments = null;
|
|
||||||
_textPainter.dispose();
|
_textPainter.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
@ -1684,7 +1684,7 @@ void main() {
|
|||||||
expect(RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1), SystemMouseCursors.basic);
|
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.
|
// Regression test for https://github.com/flutter/flutter/issues/104595.
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
home: SelectionArea(
|
home: SelectionArea(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user