From fbb4f454e515cd0558147cd2418d22c91ac5ab3e Mon Sep 17 00:00:00 2001 From: jezell Date: Sat, 16 Mar 2024 17:20:37 -0700 Subject: [PATCH] fix dispose of text painter (#1774) --- lib/src/widgets/others/proxy.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/src/widgets/others/proxy.dart b/lib/src/widgets/others/proxy.dart index 6039a009..9504a11f 100644 --- a/lib/src/widgets/others/proxy.dart +++ b/lib/src/widgets/others/proxy.dart @@ -75,6 +75,12 @@ class RenderBaselineProxy extends RenderProxyBox { super.performLayout(); _prototypePainter.layout(); } + + @override + void dispose() { + super.dispose(); + _prototypePainter.dispose(); + } } class EmbedProxy extends SingleChildRenderObjectWidget { @@ -293,4 +299,10 @@ class RenderParagraphProxy extends RenderProxyBox _prototypePainter.layout( minWidth: constraints.minWidth, maxWidth: constraints.maxWidth); } + + @override + void dispose() { + super.dispose(); + _prototypePainter.dispose(); + } }