Understanding Object Lifetime

  • Andrew Troelsen
  • Philip Japikse

Abstract

At this point in the book, you have learned a great deal about how to build custom class types using C#. Now you will see how the CLR manages allocated class instances (aka objects) via garbage collection. C# programmers never directly deallocate a managed object from memory (recall there is no delete keyword in the C# language). Rather, .NET objects are allocated to a region of memory termed the managed heap, where they will be automatically destroyed by the garbage collector “sometime in the future.”

Keywords

Garbage Collection Object Graph Garbage Collector Object User Static Void 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Andrew Troelsen and Philip Japikse 2015

Authors and Affiliations

  • Andrew Troelsen
    • 1
  • Philip Japikse
    • 1
  1. 1.MinneapolisUSA

Personalised recommendations