A memory leak happens when a certain amount of memory that is no longer required by an application does not get returned to the pool of available memory. The problem is that returning bits of unused memory to the operating system is an undecidable problem. That is, it can’t happen automatically. It is up to developers to specify whether any piece of memory is to be returned. Unfortunately, it is very easy to overlook this, especially if several developers work together.
Another problem is that it is tough to tell if a leak has occurred. They’re often so small that you wouldn’t even notice, and then you must back and carefully analyze your work if performance starts to suffer.
To identify the leak, go back to your app and analyze a particular workflow that you would expect to be memory-neutral - something like moving back and forth between screens, for example. If there is a leak, you will see your app’s memory consumption increase as you perform these functions. The best way to run this test is through Instruments (if you are working in iOS) or Studio Profiler in Android.