dynamic-memory-analyzer

Analyze ace_engine source code for new/delete pairing bugs and memory leaks.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill dynamic-memory-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dynamic-memory-analyzer
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/oh-stability/memoryLeak/dynamic-memory-analyzer
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill dynamic-memory-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you detect and explain dynamic memory management issues (especially new/delete and ownership mistakes) in the ace_engine codebase, reducing the risk of leaks, double deletes, and unsafe lifetime handling.

Core Features & Use Cases

  • Comprehensive dynamic analysis for 17 leak scenarios covering pairing mismatches, smart-pointer misuse, exception safety gaps, ownership transfer problems, container pointer cleanup, singleton/callback/multithread patterns, cross-layer lifecycle issues, and return-path leaks.
  • Pattern-driven detection guidance using stored reference rules to find probable issues quickly and consistently.
  • Actionable reporting structure with severity levels and fix recommendations to turn findings into a remediation plan.

Use Case Example: When reviewing a recent ace_engine change that introduced early returns or callback-based cleanup, run this Skill to identify whether the new/delete pairing and ownership semantics are correct across all paths.

Quick Start

Use this skill to analyze memory management in the ace_engine frameworks code by providing the target directory and asking it to generate a categorized memory management report.

Frequently Asked Questions about dynamic-memory-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect memory leaks and new delete pairing bugs in ace_engine source code?

Memory leak detection in ace_engine source code involves analyzing dynamic memory management to identify new/delete pairing bugs, ownership transfer problems, and unsafe lifetime handling across exception paths and callbacks. Statistical analysis provides overview metrics while reference pattern rules detect 17 core leak scenarios with severity classification and fix recommendations.

What memory safety issues can smart-pointer analysis find in ace_engine?

Smart-pointer analysis in ace_engine identifies RefPtr and WeakPtr misuse, ownership transfer problems, singleton cleanup failures, and callback-based memory leaks. It checks raw pointers and smart-pointer patterns across exception paths, cross-layer interactions, containers, lifecycles, and return paths to ensure proper memory safety verification.

How do I check ace_engine exception safety for dynamic memory management?

Checking ace_engine exception safety requires analyzing dynamic memory allocation to verify new/delete pairing correctness across all exception paths. The analysis applies reference pattern rules to detect pairing mismatches, smart-pointer misuse, and ownership transfer problems, generating categorized reports with severity levels and actionable fix recommendations.

Can I use pattern-driven detection to find lifecycle management issues in ace_engine callbacks?

Pattern-driven detection using stored reference rules can find lifecycle management issues in ace_engine callbacks, singletons, and multithread patterns. The approach covers 17 leak scenarios including container pointer cleanup and cross-layer lifecycle problems, providing consistent detection with severity classification and remediation guidance.

What is the best way to analyze ace_engine return paths for memory leaks?

Analyzing ace_engine return paths for memory leaks is best done by running statistical analysis for overview metrics and applying reference pattern rules to detect early return scenarios. This approach identifies new/delete pairing mismatches and ownership transfer problems across all return paths, generating reports with severity levels and fix recommendations.

When do I need dynamic memory analysis for ace_engine code changes?

Dynamic memory analysis for ace_engine is needed when reviewing code changes that introduce early returns, callback-based cleanup, or cross-layer interactions. It identifies whether new/delete pairing and ownership semantics remain correct across all paths, detecting 17 core leak scenarios with severity classification and actionable fix recommendations.