Memory leak is a condition when a program or any application or software does not releases the allocated memory. Memory leaks are blocks of allocated memory that the program no longer references. Its a kind of bug and should always be fixed. Leaks waste space by filling up pages of memory with inaccessible data and waste time due to extra paging activity. Leaked memory eventually forces the system to allocate additional virtual memory pages for the application, the allocation of which could have been avoided by reclaiming the leaked memory.When the allocated memory is not released back to OS it shows "out of memory" exception after a certain time. This may also result in system slowness and sluggish behaviour. The best practice is to release the memory once the desired activity is performed on the system.
Its easy to find out the memory leak. Do a series of test on the application and then return to the initial state. The memory must be released by the system If it doesn't happens the empty memory keeps on getting filled. In object-oriented programming, a memory leak may happen when an object is stored in memory but cannot be accessed by the running code.
Its easy to find out the memory leak. Do a series of test on the application and then return to the initial state. The memory must be released by the system If it doesn't happens the empty memory keeps on getting filled. In object-oriented programming, a memory leak may happen when an object is stored in memory but cannot be accessed by the running code.
No comments:
Post a Comment