Flutter garbage collection does not allow out of order children to be collected

This issue has been tracked since 2022-09-22.

It currently expects children to be collected in sequential order.
While developing the dynamic_layouts package in flutter/packages, @DavBot02 and @snat-s created grid layout patterns that allowed children to deviate from sequential order.

This did not allow for proper efficient garbage collection of leading children as their layouts were used to create more and more complex layouts.

Because of this, the leading children are not currently collected there in order to maintain the layout.

We should consider:

  • updating the dynamic_layouts package to cache the layout of preceding tiles, so some of them can be garbage collected. That way as user's scroll back up, the tiles can be replaced where they belong
  • or, consider a new garbage collection option to pick children ad hoc.
More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2022-10-04
Star Count 145499
Watcher Count 3567
Fork Count 23393
Issue Count 11206


Issue Title Created Date Updated Date