Posts

Showing posts from August, 2018

Memory Leak in Delphi and How to avoid it

Image
What is Memory Leak Every time when we no longer use an object in our code, we should delete it, by freeing the memory it was allocated. If we don't do this, our program can allocate more and more memory as it runs. This will also fail to remove unwanted blocks of memory is called a memory leak. And if we run the program long enough without solving memory leak issue then our program will use up the memory resources of our PC and the PC will slow down and eventually hang at last. What are the problems faced by memory leaks? - Memory leak slows down the system and doesn’t let the normal applications to run too. - Memory leak causes more problems for the overall speed and generate lots of error message like Stack overflow, etc. - Memory leak also doesn’t allow other applications on the system to run due to the memory overflow error. - It can be detected and application can be made such that while its termination it releases the memory as well. - It doesn’t run for a v