IjzerenHein / famous-flex

Animatable layouts, FlexScrollView & widgets for famo.us.
MIT License
279 stars 44 forks source link

Surface leakage issue because of Entity.register #124

Closed BodhiHu closed 8 years ago

BodhiHu commented 8 years ago

Hi guys, please checkout this issue on stackoverflow: http://stackoverflow.com/questions/23623586/how-to-remove-surfaces-from-a-layout?lq=1

Wondering if this also exists in famous-flex ?

PS. Happy new year :beers:

IjzerenHein commented 8 years ago

Famous-flex itself doesn't have such a leak. It doesn't keep track of surfaces or anything in global lookup dictionaries. Famous v3 does so you have to be a bit careful with it. I myself never always create as little surfaces/views as possible and re-use surfaces/views where possible. For instance by putting them in a pool when not needed anymore and re-using those when needed (e.g. for dynamically populated lists).

Does that answer your question?

BodhiHu commented 8 years ago

Hi @IjzerenHein , Thanks~