Memory Leak Detection via Random App Runs and Snapshot Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory leak detection methods require manual triggering of applications, leading to low efficiency and limited detection of memory leaks in a small number of classes, reducing overall effectiveness.

Innovation Solution

A method and apparatus for automatically generating a running instruction for an application, obtaining memory snapshots, and performing memory leak detection on specified classes, including service-related classes, to improve detection efficiency and comprehensiveness.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If manual triggering is used to run the application for memory leak detection, then the detection process is simple to implement, but the detection efficiency is low and labor participation is high

Engineering Contradiction:
Improveease of implementationVSAvoiddetection efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The detection system automatically triggers application execution and performs memory leak detection without manual intervention. The automated detection agent monitors memory usage, captures snapshots, and analyzes leaks independently, eliminating the need for manual page triggering while maintaining implementation simplicity through standardized automated workflows

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

Manual mechanical triggering operations are replaced with an automated detection system that uses software agents to programmatically execute applications, monitor memory states, and analyze leaks. This substitution of manual mechanical actions with automated software control significantly improves detection efficiency while keeping the system easy to implement through standardized interfaces

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Ease of operation

If a tool package is used to detect memory leaks, then the detection process is straightforward, but the detection scope is limited to a small number of classes

Engineering Contradiction:
Improvedetection simplicityVSAvoiddetection scope
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The detection system is designed to universally handle memory leak detection across multiple application classes and frameworks. The automated detection agent can adapt to different class structures, service types, and application architectures, enabling comprehensive detection across the entire codebase rather than being limited to specific predefined classes

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The detection system dynamically adapts to the application's class structure and service types during runtime. The automated agent can identify and monitor relevant classes based on actual execution patterns and memory usage characteristics, allowing the detection scope to expand and contract dynamically according to the application's needs rather than being fixed to a small predetermined set of classes

Inventive Principle:
Principle #15Dynamics

3Productivity

If automated random running instructions are generated and multiple classes are detected, then the detection efficiency and comprehensiveness improve, but the system complexity increases

Engineering Contradiction:
Improvedetection efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The complex detection system is segmented into modular functional components: an automated detection agent for triggering applications, a memory snapshot capture module, and an analysis engine for identifying leaks. Each module handles a specific aspect of the detection process independently, which manages system complexity through functional decomposition while enabling comprehensive multi-class detection across service-related, utility, and core business classes

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20260056827A1Memory leak detection method and apparatus, electronic device, and a storage medium
Publication Date: 2026.02.26 BEIJING ZITIAO NETWORK TECH CO LTD
  • US20260056827A1 patent drawing
  • US20260056827A1 patent drawing
  • US20260056827A1 patent drawing

AI summary

Embodiments of the present disclosure provide a memory leak detection method and apparatus, an electronic device, and a storage medium. The method includes: obtaining a memory leak detection instruction for a first application, and generating a running instruction for the first application based on the memory leak detection instruction randomly; triggering the first application to run based on the running instruction, and obtaining running data of the first application; obtaining a memory snapshot of the first application in response to the running data of the first application meeting a running data requirement; and performing memory leak detection on a plurality of first specified classes of the first application based on the memory snapshot of the first application. The first specified classes include service-related classes in the first application.