Garbage Collection
Although I've talked a lot about objects (you can't talk about anything .NET-related without talking about objects), I've avoided discussing the underlying technical details of how .NET creates, manages, and destroys objects. Although you don't need to know the complex minutiae of how .NET works with objects, you do need to understand a few details of how objects are destroyed.
As I discussed in the rest of this book, setting an object variable to null or letting it go out of scope destroys the object. However, as I mentioned in Hour 16, “Designing Objects Using Classes,” this isn't the whole story. The .NET platform uses a garbage collector for destroying objects. The specific type of garbage collection implemented by .NET ...
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