Re: difference between private static and public static.
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Wed, 3 Jan 2007 21:45:03 -0000
Mark R. Dawson <MarkRDawson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi Jon,
in the article there is the comment:
"Every static variable is stored on the heap, regardless of whether it's
declared within a reference type or a value type. There is only one slot in
total no matter how many instances are created. (There don't need to be any
instances created for that one slot to exist though.) Note that this heap is
separate from the normal garbage collected heap - it's known as a "high
frequency heap", and there's one per application domain. "
However, from reading this article:
http://msdn.microsoft.com/msdnmag/issues/05/05/JITCompiler/
It makes the comment that only primitive static types will be stored on the
high frequency heap, whereas static value types and reference types are still
stored on the normal GC Heap.
Ooh, interesting. I'll look into it - thanks very much. The stuff about
the high frequency heap was going on what Willy has said in the past :)
I suspect that it's better for the sake of simplicity to remove the
reference to the high frequency heap and just refer to that article...
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: difference between private static and public static.
- From: Willy Denoyette [MVP]
- Re: difference between private static and public static.
- References:
- difference between private static and public static.
- From: archana
- Re: difference between private static and public static.
- From: Scott M.
- Re: difference between private static and public static.
- From: Jon Skeet [C# MVP]
- Re: difference between private static and public static.
- From: Willy Denoyette [MVP]
- Re: difference between private static and public static.
- From: Jon Skeet [C# MVP]
- Re: difference between private static and public static.
- From: Jon Skeet [C# MVP]
- difference between private static and public static.
- Prev by Date: Re: dow do I publish a windows service?
- Next by Date: Object Lifetime.
- Previous by thread: Re: difference between private static and public static.
- Next by thread: Re: difference between private static and public static.
- Index(es):
Relevant Pages
|