What is Memory leak ?
Memory which has no pointer pointing to it and there is no way to delete or reuse this memory(object), it causes Memory leak. { Base *b = new base(); } Out of this scope b no longer exists, but the memory it was pointing to was not deleted. Pointer b itself was destroyed when it went out of scope.