AnnulusGames / LitMotion

Lightning-fast and Zero Allocation Tween Library for Unity.
https://annulusgames.github.io/LitMotion/
MIT License
828 stars 66 forks source link

Change: FastListCore initialization to be lazy #107

Closed AnnulusGames closed 8 months ago

AnnulusGames commented 8 months ago

FastListCore runs the risk of forgetting to initialize, plus an empty list can cause an infinite loop in resize. To avoid this (and to avoid unnecessary allocations), the initialization process is delayed.

Akeit0 commented 8 months ago

Intialization on EnsureCapacity should be optimized to avoid unnecessary array allocation.