Hello
I’ve been working on a long-running application & noticed that over time; memory usage keeps increasing, even when no additional data is being processed. This suggests a possible memory leak, but I’m having trouble pinpointing the exact cause. 
The issue persists across different environments & I’ve ruled out obvious culprits like unclosed file handles or excessive object retention. 
I’ve tried using profiling tools to track memory allocation and deallocation; but the results aren’t conclusive. Are there any best practices or tools that you recommend for efficiently identifying and fixing memory leaks in applications that need to run continuously for extended periods?
Additionally, I’m curious if garbage collection settings or manual memory management techniques could help mitigate this issue. I checked https://learn.microsoft.com/en-us/windows/win32/win7appqual/preventing-memory-leaks-in-windows-applications-Java Certification course online resources, and found it quite informative.
Would love to hear from others who have dealt with similar problems and how you tackled them! Any advice on debugging strategies or code review practices to catch leaks early would also be helpful. 
Thank you !! 
Depends on the used programming language and libraries. There is no “fits for all” way but for every language/Library compination individual way. As the most of my Apps are Java applications I have a few shich are lont ime runners. But I have no problems like this. I had problems like this with every single Xojo application. That shows that it depends extremely on the language it runs on. As far as I know.
How much is the app leaking per hour?
If it is just a few MB, I wouldn’t care.
All OS have libraries which leak memory, e.g. by allocating an object and keeping it around forever.
When you observe the memory keeps growing, first check which part of memory is growing. Is it the heap, off-heap, or native memory..? Because, based on this, the problem may be different. Each will point to a different class of problems. The profiling tool you used may not be helpful in this case, as you mentioned your application is a long-running one. Only if the profiling tool is used over time, can you identify the problem. You can actually take multiple heap dumps at different intervals and compare them. Comparing these dumps will help you in revealing which object types keep growing and what is holding references to them. There are several tools available to monitor these issues in Java applications. These tools, like heap analyzers, GC logs, and native memory tracking ,will be useful when they are combined.
Java programs can be checked for a heap memory leak by observing its memory usage over time and analyzing how it behaves after garbage collection. Java has automatic garbage collection, which essentially clears unwanted objects from the application. This garbage collection will only free up objects that are no longer referenced or are not reachable. When objects that are no longer needed still reference other objects, the garbage collector will not recognize these objects as unwanted ones, and this will not help in reclaiming the memory. If this persists, it will slowly lead to a memory leak. This behavior can be easily identified by analyzing garbage collection logs using tools such as GCeasy, which highlights heap usage trends, old generation growth, and memory reclamation after full garbage collection. To further confirm the issue, heap dumps can be captured at different intervals and analyzed using tools like VisualVM, Eclipse Memory Analyzer Tool (MAT), or fastThread. Objects that continue to grow in number or retained size across multiple heap dumps are strong evidence of a heap memory leak. For a deeper understanding of common signs of a Java memory leak, identifying memory leaks by analyzing a heap dump, check out this blog, From Symptoms to Solutions: Troubleshooting Java Memory Leaks & OutOfMemoryError.