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.”
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2015 Andrew Troelsen and Philip Japikse
About this chapter
Cite this chapter
Troelsen, A., Japikse, P. (2015). Understanding Object Lifetime. In: C# 6.0 and the .NET 4.6 Framework. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1332-2_13
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1332-2_13
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1333-9
Online ISBN: 978-1-4842-1332-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)