when using LazyRow to show a list of items, at what point do views of items which are scrolled out-of-view get cleaned up/recycled?
z
Zach Klippenstein (he/him) [MOD]
04/12/2021, 11:28 PM
I believe that currently, the first composition/frame after the scroll that results in an item’s bounds being outside the list bounds, it will stop being composed.
a
Adam Powell
04/12/2021, 11:46 PM
We're looking at a bunch of various optimizations like precomposition of items you might reach soon during frame downtime such that making assumptions around this may not have the effect you want. Are you asking out of general curiosity, or because you're relying on the composition lifecycle of items?
j
james
04/12/2021, 11:50 PM
purely curiosity! I searched online for an answer and there’s plenty of info about new views being lazily drawn, but I didn’t find anything about what happens as they disappear off-screen.. I was just wondering how effectively the memory is managed