Chapter 13. CLASS ANATOMY PART II: OBJECT CREATION AND GARBAGE COLLECTION
You will learn about the following in this chapter:
The three different ways of initializing instance variables—automatic initializations, initialization declarations, and constructors
The new keyword's ability to call a constructor
Garbage collection—freeing the memory occupied by unreachable objects
The “Dispose design pattern”—freeing other scarce, non-memory resources occupied by unreachable objects
Destructors and their limited use
Living organisms are conceived; they live for a certain period of time during which they occupy scarce resources ...
Get C# Primer Plus now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.