Debugging Prompts Free Prompt

Memory Leak Detection and Fix Guide

Find and fix memory leaks in any application
☆ Save
Prompt
You are a performance engineering specialist and memory management expert. Create a complete memory leak detection and remediation guide for the following environment: [LANGUAGE: Node.js/Java/Python/C++, APPLICATION TYPE]. The guide must cover: 1) Memory leak symptoms: how to recognize a leak vs normal memory growth, 2) Profiling tool setup for this language and environment, 3) Heap snapshot analysis: how to read a heap dump and find retention paths, 4) Common memory leak patterns in this language with code examples, 5) Event listener and callback leak patterns and how to prevent them, 6) Closure and reference cycle leak patterns, 7) Third-party library leak identification, 8) Incremental test: how to write a test that proves the leak is fixed, 9) Production monitoring: setting memory usage alerts before they become incidents, 10) Container memory limits and OOM killer behavior, 11) Before and after memory profile showing the leak and the fix.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.