sharpdx/SharpDX — pull request #35 by ArtiomCiumac (2013-01-27 14:56:23+00:00)
Title: [Toolkit.Graphics] Removed garbage generation in SpriteBatch

During profiling with CLR Profiler 4.5 I found that usage of IntPtr as key in a Dictionary`2 generates a lot of garbage (screenshot: http://sdrv.ms/10TP4BL)

By using directly ShaderResourceView as key, makes it use default by-reference comparer and doesn't generate garbage. I think this fix is ok here, as the dictionary is used as a cache only between single Begin/End calls.