Skip to content

PageView uses global controller, that is never disposed. #141119

@polina-c

Description

@polina-c
// Having this global (mutable) page controller is a bit of a hack. We need it
// to plumb in the factory for _PagePosition, but it will end up accumulating
// a large list of scroll positions. As long as you don't try to actually
// control the scroll positions, everything should be fine.
final PageController _defaultPageController = PageController();

This code is very old (7 years): #7948. Unfortunately the PR that introduced it doesn't include any additional rationale.

Metadata

Metadata

Assignees

Labels

a: leak trackingIssues and PRs related to memory leaks detected by leak_tracker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions