Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Memory leakage detection method and apparatus for Android application

A technology for memory leaks and detection methods, applied in the field of Android system memory management, can solve problems such as program crashes and occupy a lot of memory, and achieve the effects of improving robustness, simple and flexible use, and improving development efficiency.

Inactive Publication Date: 2017-10-10
卓望数码技术(深圳)有限公司
View PDF4 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is to provide a memory leak detection method and device for Android applications, to solve the problem in the prior art that memory leaks will occupy more and more memory, so that the program crashes

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Memory leakage detection method and apparatus for Android application
  • Memory leakage detection method and apparatus for Android application

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific implementation manners of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the following descriptions are only specific illustrations of the embodiments of the present invention, and should not limit the protection scope of the present invention.

[0034] The present invention provides a method for detecting memory leaks of Android applications. The purpose of the method is to address the problem that memory leaks in the prior art will occupy more and more memory, so that the program crashes, and through the Android life cycle and the use of weak references , monitor the memory leakage in application program development, the method and device are simple and flexible to use, not only improve the robustness of the program, but also improve the development efficiency o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention discloses a memory leakage detection method and apparatus for an Android application. The memory leakage detection method comprises: establishing a weak reference audio monitor, wherein the weak reference audio monitor monitors the Activity component of the currently running application; and when the Activity component is destroyed, detecting whether there is a reference to the Activity component, if so, triggering a memory recovery mechanism, and detecting whether there is a weak reference to the Activity component. Beneficial effects of the method and apparatus disclosed by the present invention are that, by arbitrarily setting a monitor object, monitoring of the memory leakage in the application development can be facilitated; and the method and apparatus are simple and flexible, so that not only the robustness of the application is improved, and the development efficiency of the engineer is improved.

Description

technical field [0001] The invention relates to the technical field of Android system memory management, in particular to a memory leak detection method and device for Android applications. Background technique [0002] In the code writing based on the Android (Android) system, according to the working experience of the developer, the code that is prone to memory leaks is generally processed. [0003] Currently, in Android application development, objects still hold references to the objects after they are used, so that previously allocated memory cannot be reclaimed, resulting in memory leaks. This requires developers to exercise additional control over codes that are prone to memory leaks to prevent memory leaks. For example, the importance of context (context environment) is self-evident. Context has its own life cycle. If it is used improperly, it will always hold a reference to the context, which will cause the existence of the context to exceed its own life cycle, whi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36
CPCG06F11/3636
Inventor 张玉竹
Owner 卓望数码技术(深圳)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products