Method and device for detecting IOS memory leak and computer readable medium
A memory leak and computer technology, applied in the detection of faulty computer hardware, fault hardware testing methods, calculations, etc., can solve problems such as inability to detect leaks, memory leaks, poor performance, etc., to improve the detection hit rate, improve Repair rate, ensure the effect of high efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] The method for detecting IOS memory leaks of the present invention uses Method Swizzing technology to hook the constructors and destructors of the parent class NSObject of all self-built classes, and recognizes the life cycle of the object held by the current class, and detects the current Classes do need to be freed to detect memory leaks.
[0032] At runtime, we use Method Swizzing technology to hook the constructors and destructors of all classes, so as to clearly know whether the hooked class is released at the right time. We need to HOOK the constructors and destructors of all classes. In the OC language, because the parent class of all classes is NSObject. Therefore, we can directly hook the constructor and destructor of the NSObject class.
[0033] After we HOOK the life cycle function of the self-built class, we also need to know the life cycle of the self-built class clearly. We can know who is currently holding the HOOKed object. When the life cycle of the he...
Embodiment 2
[0050] The device of the present invention includes: at least one memory and at least one processor; at least one memory for storing a machine-readable program; at least one processor for calling the machine-readable program to execute any embodiment of the present invention methods disclosed in .
Embodiment 3
[0052] A computer-readable medium of the present invention stores computer instructions on the computer-readable medium, and when the computer instructions are executed by a processor, the processor executes the method disclosed in Embodiment 1. Specifically, a system or device equipped with a storage medium may be provided, on which a software program code for realizing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU of the system or device) ) to read and execute the program code stored in the storage medium.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com