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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 5: Application-Specific Problems<br />

Conclusion<br />

We have seen some recurring <strong>the</strong>mes across a wide range <strong>of</strong> .<strong>NET</strong> platforms. New<br />

technologies <strong>of</strong>ten solve old problems, but <strong>the</strong>y <strong>of</strong>ten create <strong>the</strong>ir own new problems, as<br />

well as <strong>the</strong>ir own variations on some old problems. <strong>Under</strong>standing how <strong>the</strong>se problems<br />

show up on <strong>the</strong>se various platforms makes it easier to understand and appreciate what<br />

new versions and new platforms you should bring to <strong>the</strong> mix when developing your<br />

applications. This makes it easier to learn new technologies and to appreciate where <strong>the</strong><br />

gotchas are before you get burned.<br />

A few <strong>of</strong> key areas to always be on <strong>the</strong> lookout for are:<br />

• not having a properly balanced caching strategy<br />

• abusing a new technique by not applying (or, indeed, understanding) it properly<br />

• unintended references through delegates<br />

• always properly dispose <strong>of</strong> objects that implement <strong>the</strong> IDisposable interface.<br />

Regardless <strong>of</strong> <strong>the</strong> platform being used, <strong>the</strong>se guidelines will serve you well.<br />

177

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

Saved successfully!

Ooh no, something went wrong!