1

Possible Duplicate:
Best .NET memory and performance profiler?

My C# program, a web scraper, makes extensive use of async HttpWebRequests, Regex, and HTML agility pack. It's multi threaded using the ThreadPool.QueueUserWorkItem method.

It starts off using around 600,000 K of memory and eventually climbs to over 1,000,000 K.

How can I track what's taking up the most memory and clean it up so it's less resource intensive?

Thanks

Community
  • 1
  • 1
blizz
  • 4,102
  • 6
  • 36
  • 60

2 Answers2

5

Use a memory profiler - they can help to analyse such problems, for example:

Yahia
  • 69,653
  • 9
  • 115
  • 144
3

Your best bet is to use a profiler. I've had great success with using the Redgate ANTS Performance Profiler, which is not free. There may be other good choices out there.

Jacob
  • 77,566
  • 24
  • 149
  • 228