Relationship between .NET ClassLoader and Assembly
Posted
by smwikipedia
on Stack Overflow
See other posts from Stack Overflow
or by smwikipedia
Published on 2010-04-09T07:31:33Z
Indexed on
2010/04/09
7:33 UTC
Read the original article
Hit count: 467
I am wondering about the relationship between .NET ClassLoader and Assembly
I use the "!dumpdomain xxxx" command and got the following output:
Domain 1: 00522108
LowFrequencyHeap: 0052212c
HighFrequencyHeap: 00522178
StubHeap: 005221c4
Stage: OPEN
SecurityDescriptor: 00523430
Name: BoxUnbox.exe
**Assembly**: 0056eb88 [C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll]
**ClassLoader**: 0056ec08
SecurityDescriptor: 0056c078
Module Name
56d71000 C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll
**Assembly**: 005794f0 []
**ClassLoader**: 00579570
SecurityDescriptor: 0057a018
Module Name
00152c5c
I noticed that the "ClassLoader" and "Assembly" appear in pair. It seems each Assembly is accompanied with its own "ClassLoader".
Why like this? Is this a litte noisy? Why not just assign one "ClassLoader" to a AppDomain and use it to load all the used Assembly into the AppDomain? Isnt't this design more elegant?
Many thanks.
© Stack Overflow or respective owner