30.06.2013 Views

Under the Hood of .NET Memory Management - Simple Talk

Under the Hood of .NET Memory Management - Simple Talk

Under the Hood of .NET Memory Management - Simple Talk

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 1: Prelude<br />

[ThreadStatic]<br />

public static int Number<strong>of</strong>ThreadHits=0;<br />

Listing 1.16: Marking a member [ThreadStatic].<br />

Summary<br />

OK, we've covered <strong>the</strong> basics <strong>of</strong> stacks, heaps, garbage collecting, and referencing, and<br />

how <strong>the</strong>y all hang toge<strong>the</strong>r inside <strong>the</strong> .<strong>NET</strong> framework, so we're now in a good position<br />

to delve deeper into how memory management actually works. Some <strong>of</strong> <strong>the</strong> material<br />

we've covered in this chapter has been deliberately simplified so that you get a good "in<br />

principle" understanding without being buried under <strong>the</strong> fine detail. In <strong>the</strong> next chapter,<br />

we will start looking at those finer details <strong>of</strong> how memory management works and, in<br />

particular, we'll focus on <strong>the</strong> heaps, garbage collection, and object lifetimes.<br />

35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!