Currently, ViewPool instances generated for the original pool are initialized using initOpts.
Views recycled from the pool retain these settings, but when the pool is exhausted, new instances are generated without the initOpts and only use the options provided directly to obtainView.
This change retains a reference to the ViewPool's original initOpts and re-uses these options when instantiating new Views for the exhausted pool. Additionally, options provided to obtainView are always passed to the view through updateOpts, regardless of whether the View already existed in the pool or was newly-instantiated.
Nice work, Duncan. This fix makes sense. The next release will have a ViewPool with this change and your name on the Contributors list. Thanks for the great work!
Currently, ViewPool instances generated for the original pool are initialized using
initOpts
.Views recycled from the pool retain these settings, but when the pool is exhausted, new instances are generated without the
initOpts
and only use the options provided directly toobtainView
.This change retains a reference to the ViewPool's original
initOpts
and re-uses these options when instantiating new Views for the exhausted pool. Additionally, options provided toobtainView
are always passed to the view throughupdateOpts
, regardless of whether the View already existed in the pool or was newly-instantiated.