try abc

try abc

  • 1.4k
  • 306
  • 488.3k

How to prevent Memory leak & outofmemory error ?

Jul 6 2011 8:00 AM

Hello Friends,

In our  C#.NET 2005 Desktop application , in some Crystal reports "outofmemory error" comes while there are huge records.  (used SQLReader & Dataset)

Also while user uses whole application for long time it increase "commit size memory" in Task manager . So how to reduce memory leak in application ?

Also we have used IDisposable interface & using statement wherever possible.
Also we have released  "PrivateWorking set memory" wherever required.

but how to decide exactly from which place memory leaks & how to prevent it ?
what could be general cause which leads to memory leak  & increase memory usage ?


Also is "outofmemory error"   & commit size related to each other ?

Plz help

Thanks in Advance.


Answers (3)