Answered by:
Memory Leak

Question
-
Dear Friends,
Please I want to inquire what is memory leak is it means in .net CLR and how we can detect and track it.
asad
Friday, June 26, 2015 9:38 PM
Answers
-
A memory leak is memory allocated by your program which is not released by your program.
Use performance profiling to monitor memory usage as your program runs. If you see a constant climb in memory usage which never seems to lessen, then you likely have a leak. Further investigation of the profile will typically reveal the source of the leak.
Note that this is a complex topic which cannot be reasonably covered in its entirety within a forum post. Also the version of Visual Studio that you are using will impact the profiling tools that you have available.
This MSDN documentation may be a good place to start:
https://msdn.microsoft.com/en-us/library/z9z62c29.aspx
Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
- Proposed as answer by Cor Ligthert Saturday, June 27, 2015 8:24 AM
- Marked as answer by Youjun Tang Friday, July 3, 2015 9:27 AM
Friday, June 26, 2015 9:46 PM -
- Proposed as answer by Cor Ligthert Saturday, June 27, 2015 8:24 AM
- Marked as answer by Youjun Tang Friday, July 3, 2015 9:27 AM
Friday, June 26, 2015 9:48 PM -
Be aware that .Net (managed code) was likewise Java created to avoid memory leaks which occurs with older program types (C++ unmanaged).
Success
Cor- Marked as answer by Youjun Tang Friday, July 3, 2015 9:27 AM
Saturday, June 27, 2015 8:25 AM
All replies
-
A memory leak is memory allocated by your program which is not released by your program.
Use performance profiling to monitor memory usage as your program runs. If you see a constant climb in memory usage which never seems to lessen, then you likely have a leak. Further investigation of the profile will typically reveal the source of the leak.
Note that this is a complex topic which cannot be reasonably covered in its entirety within a forum post. Also the version of Visual Studio that you are using will impact the profiling tools that you have available.
This MSDN documentation may be a good place to start:
https://msdn.microsoft.com/en-us/library/z9z62c29.aspx
Reed Kimble - "When you do things right, people won't be sure you've done anything at all"
- Proposed as answer by Cor Ligthert Saturday, June 27, 2015 8:24 AM
- Marked as answer by Youjun Tang Friday, July 3, 2015 9:27 AM
Friday, June 26, 2015 9:46 PM -
- Proposed as answer by Cor Ligthert Saturday, June 27, 2015 8:24 AM
- Marked as answer by Youjun Tang Friday, July 3, 2015 9:27 AM
Friday, June 26, 2015 9:48 PM -
Be aware that .Net (managed code) was likewise Java created to avoid memory leaks which occurs with older program types (C++ unmanaged).
Success
Cor- Marked as answer by Youjun Tang Friday, July 3, 2015 9:27 AM
Saturday, June 27, 2015 8:25 AM