I feel like developers talk about memory leaks but when you ask them what that means many have no idea. To prevent these situations, let's decide on one.
Please no Wikipedia definitions...
What is your best definition of a memory leak and what is the best way to prevent them?
There are two definitions (at least for me):
Naive definition: Failure to release unreachable memory, which can no longer be allocated again by any process during execution of the allocating process. This can mostly be cured by using GC (Garbage Collection) techniques or detected by automated tools.
Subtle definition: Failure to release reachable memory which is no longer needed for your program to function correctly. This is nearly impossible to detect with automated tools or by programmers who are not familiar with the code. While technically it is not a leak, it has the same implications as the naive one. This is not my own idea only. You can come across projects that are written in a garbage collected language but still mention fixing memory leaks in their changelogs.