Chapter 34. Garbage Collection
In This Chapter
Automatic Memory Management
Finalizing Your Code Properly
Controlling Garbage Collection
C# has automatic garbage collection. This means that the memory allocated for objects is automatically tracked and cleaned up by the common language runtime. This is a welcome addition for people who have suffered through numerous memory management bugs throughout the years in other languages.
It would be nice if all we needed to do were program business logic without worrying about memory management. However, this is not yet the case. There are resource management issues also associated with memory management. Yes, the problems have decreased, but it is still necessary to understand the garbage collection process ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access