0

We are having some memory leak issues and I believe that it is related to our pages throwing an error and redirecting to the custom error page displayed to visitors.

In global.asa or web.config, how can we set it so that if a page throws an error, all open objects on that page are closed, destroyed, and variables nulled to recover that memory?

superfreaker
  • 77
  • 10
  • 1
    If you destroy the session, all components within the threading model will be removed automatically as long they aren't session persistant. So if you have session problems check the components you are using first. – YvesR Feb 26 '14 at 15:06
  • Thank you @YvesR, so on my custom error page, If I use these two: session.clear and session.removeall, then the objects will be closed? – superfreaker Feb 26 '14 at 15:08
  • Session.Abandon will be it in classic ASP, for .nET check also this : http://stackoverflow.com/questions/1470445/what-is-the-difference-between-session-abandon-and-session-clear – YvesR Feb 27 '14 at 10:18

0 Answers0