I would check the CLR Tuning Section in the document Gulzar mentioned.
As the other posters pointed out, any object that implements IDispose
should have Dispose()
called on it when it's finished with, preferably using the using
construct.
Fire up perfmon.exe
and add these counters:
- ProcessPrivate Bytes
- .NET CLR Memory# Bytes in all Heaps
- ProcessWorking Set
- .NET CLR MemoryLarge Object Heap size
An increase in Private Bytes while the
number of Bytes in all Heaps counter remains the same indicates unmanaged
memory consumption.
An increase in
both counters indicates managed memory
consumption
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…