Miscellaneous Topics
摘要
So far, all chapters have been focused on different aspects of memory management in .NET and in particular how the Garbage Collector works. At this point in the book, you have gained most of the knowledge required to understand how most of this machinery works underneath. We say “most” because, of course, there are still some minor aspects that we have not touched because of the limited size of the book. All this knowledge was intertwined with some practical tips and various scenarios (usually about diagnostics). However, for the sake of clarity and to keep individual chapters at a reasonable size, some more advanced practical aspects have been skipped. This chapter and the next one are dedicated exactly to those topics. Let’s treat them as the “crème de la crème” of .NET memory management, purely practical and covering advanced aspects of memory management. You may see the bigger and bigger adoption of such techniques as more and more performance-aware code is being written in .NET – this especially includes using Span and everything around it.