Joydeep will you please tell me that What is meant by memory leak and when it occur also Give me a simple practical example about this.
Unintentional memory consumption by a computer program where the program fails to release memory when no longer needed.
Suppose you have allocated some memory using new(in C++) or malloc/calloc (in C) and you have not deallocated the memory after using it so the memory is not returned back to the heap. For bigger projects where you need lot of memory it may cause scarcity of space when you have plenty of deallocated or unused space in your hand so this might lead to a program crash where it wouldn't have crashed if you would have returned those memory properly to the heap. It is as if the memory is "leaked out" of the program this is called memory leak.
In case if you still have doubts regarding memory leaks please feel free to get back to me.