" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Detecting Memory leak in Visual Studio (Debug mode)

Posted on November 23rd, 2015 by Manjunath G

Microsoft Visual Studio (2003/2005) informs about memory leakes in a module by setting the “leak check” bit, _CRTDBG_LEAK_CHECK_DF, to the debugger. The memory leak information is printed on “Output” window. [ This advantage is in “Debug” mode only. ] Example int _tmain() { int* ptr = NULL; ptr = (int*)malloc(sizeof(int)*20); for( int i=0; i<20; ++i […]

How to avoid Memory leak issue in Java

Posted on November 23rd, 2015 by Tanmayee Sahoo

What is Memory Leak? Memory leak is a bug that mainly occurs when a program does not release the memory it has obtained for temporary use. In other words we can say it is the condition where the available computer memory reduces gradually there by resulting in poor performance. How to determine if Memory Leak […]