Find and fix memory leaks in application code
Help me identify and fix potential memory leaks in this code: ```[LANGUAGE] [PASTE CODE] ``` Context: - Runtime environment: [NODE/BROWSER/PYTHON/ETC] - Observed symptoms: [DESCRIBE BEHAVIOR] - When it occurs: [UNDER WHAT CONDITIONS] Please: 1. Identify all potential memory leak sources 2. Explain why each is problematic 3. Provide fixed code with proper cleanup 4. Suggest monitoring strategies 5. Recommend tools for detecting similar issues 6. Add defensive patterns to prevent future leaks
Help me identify and fix potential memory leaks in this code: ```[LANGUAGE] [PASTE CODE] ``` Context: - Runtime environment: [NODE/BROWSER/PYTHON/ETC] - Observed symptoms: [DESCRIBE BEHAVIOR] - When it occurs: [UNDER WHAT CONDITIONS] Please: 1. Identify all potential memory leak sources 2. Explain why each is problematic 3. Provide fixed code with proper cleanup 4. Suggest monitoring strategies 5. Recommend tools for detecting similar issues 6. Add defensive patterns to prevent future leaks
This prompt is released under CC0 (Public Domain). You are free to use it for any purpose without attribution.
Explore similar prompts based on category and tags
Analyzes complex error stack traces to identify root causes and provide specific code fixes.
Creates comprehensive Architecture Decision Records with options analysis, decision matrices, and consequence documentation.
Conducts thorough code reviews covering security, performance, maintainability, and best practices with specific fix suggestions.
Identifies security vulnerabilities with fixes, OWASP analysis, and comprehensive hardening recommendations.