When Stroustrup was writing C++ 11, he initially wanted people to write code in a different way,
and not just in C++; a way were people would not rely on GC, simply because they aren't very efficient. Some of the changes he was proposing to Microsoft at that time would have broken all previously developed applications had they followed his .net considerations, and hence why under
his own recommendations,
Microsoft opted to go the other way. But because of the direction Microsoft took with their frameworks development some ten to twelve years ago, Microsoft had an opportunity to change how we write code today, and for the better of all languages supported under .net. But they never went for it...because the consequences on pre-existent applications would have been to great and broken them. Using GC has become a standard reliance among developers today. I find it regrettable personally.
Structs are also underused today, and I
nearly never hear nor see people using them, at least not properly. You should read
Stroustrup: FAQ regarding why C++ doesn't have garbage collection. To quote :
Also, C++ supports programming techniques that allows memory management to be
safe and implicit without a garbage collector. I consider garbage collection a last choice and an imperfect way of handling for resource management. That does not mean that it is never useful, just hat there are better approaches in many situations.
.net is mainly wrote in C#, but how its wrote is in-part dictated by the CLR/CLI which is wrote in C++ which is then broken into machine language (IL). The complexity should be evident how and why Microsoft introduced a GC for C#. When you call GC, it's called up in the CLR afaib. (Someone correct me on that). Anyway I believe this to be correct, and that is why they were introduced for calling-on in C#.
I have noticed OOP has improved a great deal as C# has matured. But with the reliance on automated memory management in C#, this has sadly led to a badly bloated framework. Not only that, but the use of GC is not very efficient all-round, because you are essentially still allocating memory when a GC is called to free up memory. Right? This was one of the reasons why Stroustrup was never a fan of GC as you have read above. That quote is from his own website. You can do some light reading on Managed Heaps, but if you are interested in memory management in application development, I recommend getting a good book/indebt articles on the subject. As any good literature would also cover the subject of class vs structs. Managed Heap Link for light reading :
Fundamentals of garbage collection. You can find lot of resources on these subjects on Coding Horrors.