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.

Classes .....................................................................................................................................117<br />

Size <strong>of</strong> an Object ....................................................................................................................117<br />

Delegates ................................................................................................................................ 124<br />

Closures............................................................................................................................128<br />

Effects <strong>of</strong> Yield ......................................................................................................................129<br />

Arrays and Collections ......................................................................................................... 136<br />

Excessive References ............................................................................................................ 141<br />

Excessive Writes and Hitting <strong>the</strong> Write Barrier .............................................................. 142<br />

Fragmentation ...................................................................................................................... 143<br />

Long-Lived Objects .............................................................................................................. 143<br />

Conclusion ............................................................................................................................144<br />

Chapter 5: Application-Specific Problems ................................. 146<br />

Introduction ..........................................................................................................................146<br />

IIS and ASP.<strong>NET</strong> ...................................................................................................................146<br />

Caching ............................................................................................................................147<br />

Debug ............................................................................................................................... 152<br />

StringBuilder ................................................................................................................... 154<br />

ADO.<strong>NET</strong> ...............................................................................................................................155<br />

LINQ .................................................................................................................................156<br />

Windows Presentation Foundation (WPF) ......................................................................160<br />

Event handlers ............................................................................................................... 160<br />

Weak event pattern ........................................................................................................ 163<br />

Command bindings .......................................................................................................168<br />

Data binding ....................................................................................................................169<br />

Windows Communication Framework ............................................................................170<br />

Benefits ............................................................................................................................. 171<br />

Drawbacks ....................................................................................................................... 171<br />

Disposable ........................................................................................................................ 173<br />

Configuration .................................................................................................................. 175<br />

Conclusion ............................................................................................................................ 177

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

Saved successfully!

Ooh no, something went wrong!