Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
345 views
in Technique[技术] by (71.8m points)

c# - Is the garbage collector in .net system-wide or application-wide?

During discussion with my collegue, I got a doubt that the garbage collector in .net works system wide or application wide.

Means if every application having its own GC then will it effect system performance?

I am little bit confused about that.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Each process has its own managed heap, which will be collected separately.

There's no system-wide heap, so there can be no system-wide GC.

(If you're running multiple CLRs in the same process, they'd each have their own GC too. That's a pretty rare situation though.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...