neuecc / UniRx

Reactive Extensions for Unity
MIT License
7.1k stars 889 forks source link

avoid boxing in ReactiveProperty.SetValue #109

Closed neuecc closed 8 years ago

neuecc commented 8 years ago

This line using object.Equals(object) https://github.com/neuecc/UniRx/blob/e3cbc24a17c122511c02054a0571ae9e30ad1a6c/Assets/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs#L80 It cause boxing if T is ValueType.

Why I avoid EqualityComparer<T>.Default? The reason is for iOS/AOT, but I dropped AOT support in 5.0.0 so I can use EqualityComparer<T>.

I'll change all boxing equals.

neuecc commented 8 years ago

5.1.0 has been released.