Question: What
is Memory Leak?
Answer:
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.
{
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.
No comments:
Post a Comment