Possible Duplicate:
Anatomy of a “Memory Leak”
Hi All what are the best practices for identifying memory leak in c#?
We know that a program should call couple of malloc/calloc and same number of free calls. If the number of malloc/calloc calls are greater than number of free calls then we are sure a memory leakage happened. So the way to detect memory leak is to trace the calls.
Enable Profiling. Java profilers are tools that monitor and diagnose the memory leaks through the application. They analyze what's going on internally in our application, like how we allocate memory. Using profilers, we can compare different approaches and find areas where we can optimally use our resources.
Memory leaks occur when new memory is allocated dynamically and never deallocated. In C programs, new memory is allocated by the malloc or calloc functions, and deallocated by the free function. In C++, new memory is usually allocated by the new operator and deallocated by the delete or the delete [] operator.
How about
ANTS Memory Profiler™: Profile the memory usage of your .NET application
ANTS Performance Profiler for optimizing your .NET code
Memory Leak Detection in .NET
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With