c# - .NET Memory size -


i have pretty basic question storing data , memory footprint.

i have list<t> stores base objects need. type t has int id define it, along other fields.

i have dictionary. if create dictionary<t, int>, t object value, memory allocation higher if create dictionary<int, int>, ie copy of t object stored, or refence t stored again?

thanks

that depends on t is. if t reference type (that is, class), reference stored in dictionary. if t value type (a struct), copy stored.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -