Skip to content

Commit 156c313

Browse files
Dispose animation controller in platform view benchmarks (#110413)
1 parent 23d258d commit 156c313

File tree

2 files changed

+14
-0
lines changed
  • dev/benchmarks

2 files changed

+14
-0
lines changed

dev/benchmarks/platform_views_layout/lib/main.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ class _RotationContainerState extends State<RotationContainer>
116116
);
117117
_rotationController.repeat();
118118
}
119+
120+
@override
121+
void dispose() {
122+
_rotationController.dispose();
123+
super.dispose();
124+
}
125+
119126
@override
120127
Widget build(BuildContext context) {
121128
return RotationTransition(

dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ class _RotationContainerState extends State<RotationContainer>
121121
);
122122
_rotationController.repeat();
123123
}
124+
125+
@override
126+
void dispose() {
127+
_rotationController.dispose();
128+
super.dispose();
129+
}
130+
124131
@override
125132
Widget build(BuildContext context) {
126133
return RotationTransition(

0 commit comments

Comments
 (0)