play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

Same initialization path for all View instances #2

Closed duncanbeevers closed 11 years ago

duncanbeevers commented 11 years ago

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.

bubbleboy14 commented 11 years ago

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!