Skip to Content
Expert C# 5.0: with the .NET 4.5 Framework
book

Expert C# 5.0: with the .NET 4.5 Framework

by Mohammad Rahman
December 2012
Intermediate to advanced content levelIntermediate to advanced
612 pages
14h 4m
English
Apress
Content preview from Expert C# 5.0: with the .NET 4.5 Framework

CHAPTER 2

images

C# Objects in Memory

This chapter examines the C# object and the relation between it and the stack and heap of the memory. The life of the value type stays in the stack, whereas the reference type stays in the heap. I will explain about these using the windbg.exe program and discuss the different sections of the memory while the CLR executes any .NET application.

Finally, this chapter will discuss boxing and unboxing by examining the stack and heap memory while executing a program.

Memory in .NET Applications

In .NET, when an application is run, the CLR uses two kinds of memory—stack and heap—to store value types and reference types. ...

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.
Start your free trial

You might also like

Pro C# 5.0 and the .NET 4.5 Framework, Sixth Edition

Pro C# 5.0 and the .NET 4.5 Framework, Sixth Edition

Andrew Troelsen
C# 4.0 Unleashed

C# 4.0 Unleashed

Bart De Smet

Publisher Resources

ISBN: 9781430248606Purchase book