.Net Dictionary out of memory exception at around 6,000,000 entries

前端 未结 5 2011
醉话见心
醉话见心 2020-12-17 15:19

I am using a Dictionary to store the frequency of colors in an image, where the key is the the color (as an int), and the value is the number of

5条回答
  •  太阳男子
    2020-12-17 15:54

    Try using an array instead. I doubt it will run out of memory. 6 million int array elements is not a big deal.

提交回复
热议问题