2009年3月20日 星期五

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.

沒有留言:

張貼留言