I have an ASP.NET website that will hit about 2gb physical memory used within about 3-4 days, which to me sounds really bad. At the moment, I have configured IIS to restart
If your ASP.NET application uses events (and which one doesn't), then you have to make sure you unsubscribe from the event.
Rule of thumb:
If you use +=
to subscribe to an event, then you need to use -=
in the Dispose()
method to unsubscribe.
There are lots of resources on this topic, and I've had a bit of pain in applications I've worked in because your run-of-the-mill programmer doesn't realize that events can cause memory leaks.