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
  • 3,959
  • 5
  • 32
  • 55

2 Answers2

5

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

Yahia
  • 68,257
  • 8
  • 107
  • 138
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
  • 75,331
  • 23
  • 142
  • 223