Objective 2.6: Manage the object life cycle

In languages such as C++, you have to worry about memory management. Using pointers and managing memory whenever possible is necessary for writing applications. Forgetting to free some memory can result in a memory leak. In C#, things are different. C# is a managed language that uses a garbage collector to free memory whenever necessary. As long as you use only managed objects, the garbage collector frees you from worrying about memory management. However, when writing applications, you will often cross the boundaries and use unmanaged resources such as database connections or file handles. When dealing with these kinds of situations, you need to free those resources as soon as possible. In this objective, ...

Get Exam Ref 70-483: Programming in C# 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.