Tools used: Product--Analyze
The tool is simple to use and can perform memory analysis during code compilation to identify potential memory leaks in your code. Without the need to actually run.
At the end of the analysis, you will get information similar to warring and error in issue navigator:
Points of each memory leak are pointed out.
which
Dead Store
Value stored to ' xxxx ' is never read
Indicates that a variable is defined but not used.
Memory (Core foundation/objective-c)
Potential leak of an object stored into ' xxxx '
Indicates that the object has a potential leak.
Other types of hints are not listed here.
Workaround:
Click on the message and it will be directed to the location of the corresponding code:
Clicking on the message following the code will show the interactive details:
Then follow the prompts to modify the relevant code.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
iOS Development-Memory static analysis