开发者

How many instances of the CLR are running?

There is a simple Hello World Console Application. We compile开发者_开发知识库 it and get an assembly (EXE). The EXE is copied into 5 different folders and run from each of the locations. How many instances of the CLR are running when the 5 copied instances are running at the same time?”


Each physical process gets its own copy of the CLR because each is hosted separately. Thus if you create 3 instances of your .NET app you will have 3 copies of the CLR running. Each process will have at least one AppDomain. Where it gets sort of tricky is with domain-neutral assemblies. Domain-neutral assemblies, like some of the system assemblies, are actually shared across AppDomains. This reduces the footprint of the CLR.

check original answer at : http://social.msdn.microsoft.com/Forums/en-US/clr/thread/238c5f43-1d12-4c80-a987-0b8fdfd6d7e4


It runs 5 different processes each with its own CLR instance.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜