.NET Collections and the Large Object Heap (LOH)

后端 未结 4 1335
渐次进展
渐次进展 2020-12-11 02:45

Are .NET collections with large number of items apt to be stored in the LOH?

I\'m curious about List and Dictionary specifically. In my code, I store a large number

4条回答
  •  爱一瞬间的悲伤
    2020-12-11 03:16

    Dictionary has O(LOG N) vector for the key/value, so in 40K+ objects your pretty safe. As said here before List is implemented as array so big list are indeed on the LOH. You can check if you object is on the LOH using SOS.

提交回复
热议问题