Re: Please Explain where will the struct be stored if it is declared inside the Class



Willy Denoyette [MVP] <willy.denoyette@xxxxxxxxxx> wrote:
> > It doesn't get much more detailed than Jon's article:
> >
> > http://yoda.arachsys.com/csharp/memory.html
>
> Agreed, just one small remark though, The article states "Every static
> variable is stored on the heap", this is not completely correct if Jon here
> meant the GC heap.
> Static variables are not stored on the GC heap, but they live on a private,
> per application domain heap, more precisely, on the "High Frequency heap"
> within the loader heap. So, if you ever wonder where the PairOfInts static
> counter variable lives, well it's on the "High Frequency Heap".

Righto - I'll amend the article when I get some time.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.



Relevant Pages