<story><title>On Stack Overflow&apos;s recent battles with the .NET Garbage Collector</title><url>http://samsaffron.com/archive/2011/10/28/in-managed-code-we-trust-our-recent-battles-with-the-net-garbage-collector</url></story><parent_chain></parent_chain><comment><author>david_a_r_kemp</author><text>Let me prefix this rant by saying I Love C# and .Net. I think it&apos;s a really good platform to build on, as demonstrated by it&apos;s growth outside of the Microsoft world.&lt;p&gt;This article highlights why (good) C/C++ have such a hard time moving to C#/.Net. In .Net memory management is, 99.9999999999% of the time, fire and forget, whereas a big chunk of learning and programming C/C++ is about memory management. 
Most C, and some C++, programmers would have baulked at having a massive object graph in memory - releasing it becomes a massive headache, and that&apos;s before you even get into synchronisation issues, and the .Net team have done a really good job of taking this headache away (yes, I realise they &apos;re not the first). 
However, we&apos;re now at the point where there are a lot of C# programmers who&apos;ve never heard of a linker (by default, csc compiles and links in one go), have little concept of static vs dynamic linking, and, more importantly, don&apos;t have the first clue about memory management.
This manifests itself in things like not using IDisposable properly/consistently, using the string.+ operator rather than using StringBuilder/StringWriter, and developers have no idea about the difference between class and struct, especially when it comes to parameter handling.
Even books like (the excellent) C# in Depth are pretty light on the memory management side of things, deferring this to books about the CLI and DNR. Whereas, the truth is, if you&apos;re going to write a big application, you&apos;re going to have some concept of this.</text></comment>
<story><title>On Stack Overflow&apos;s recent battles with the .NET Garbage Collector</title><url>http://samsaffron.com/archive/2011/10/28/in-managed-code-we-trust-our-recent-battles-with-the-net-garbage-collector</url></story><parent_chain></parent_chain><comment><author>smiler</author><text>I think stackoverflow is the first high volume .net site that have gone in depth publically with how they are solving their performance issues. Microsoft should be paying them for the continued great PR</text></comment>