0
What is a memory leak & what are its consequences? Is it necessary to deallocate heap memory?
why is a memory leak called a 'leak'? is memory deallocation necessary only for a large program?...
5 Antworten
0
Sushank Mishra it's not necessary to do deallocation for large program... fact is that you may observe issue in large program due to more unutilized memory.... one should go with deallocation of heap memory after usage...
leak terminology is due to fact that it is wastage... you can't use is properly... memory leak also say same thing that you have allocated memory and used it... but as you have not deallocated, it's free and of know use, but you cannot reuse it... why ?? because once allocated memory is not available to be utilised unless you deallocate
0
if the memory once allocated on the heap,if not deallocated by the program, then the same memory location can't be used for other programs?
0
or is it that even after using the dynamic memory allocation, the compiler will never provide the other programs with that memory location?
0
if that is the case are there any safeguard with the OS or any other system component which handles the junk memory locations on the heap?
0
it crashes memory and parent application is closed , memory allocated is free now..