Perhaps the most commonly asked questions regarding memory management in .NET
are: "How long does a garbage collection take," and "How can I control when
the garbage collector runs?" Apprehensive that "pauses" caused by garbage
collections will be perceived by users, application developers often search
for ways to control when garbage collections occur. Not surprisingly, the
standard answer from Microsoft on these issues is to leave the collector to
do its thing instead of trying to control it manually. Nevertheless, concern
over garbage collection timing and performance remains.
The single biggest factor in determining when a garbage collection occurs and
how long it will take is the number of managed objects that your application
allocates. Therefore understanding how ... (more)
In the February issue of .NET Developers Journal, I described how implicit
operations such as the boxing of value types can dramatically increase the
amount of memory your .NET Compact Framework application uses. At the time,
the tools available to help you get a picture of how your application uses
memory were very limited. While version 2 of the Compact Framework did report
performance... (more)