Trace a memory leak
Step through a systematic approach to finding memory leaks with profiling tools and code analysis. Surfaces common leak patterns and provides targeted fixes.
Preview
Copy prompt
My [Language] application is leaking memory and RSS grows steadily over time. The relevant code is: [Paste code]. Describe a systematic step-by-step approach to locate the leak, naming specific profiling tools to use for this language. Identify any obvious leak patterns in the pasted snippet — such as event listeners that are never removed, unclosed streams, or retained closures — and provide targeted fixes for each.
More
Debugging
Prompts
