I found that static analyzer means run with analyzer using xcode. Then what does dynamic analyzer mean? How to use that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Static analysis can be seen as a stricter check of syntax made by an advanced compiler (that will not produce binary code but error messages).
Dynamic analysis is a specific analysis done when the program is actually running. Thins kind of analysis, being done at runtime, can detect specific behaviors, like accessing deallocated memory, leaking memory, time spent in functions and so on.
To put it roughly, is static analysis is advanced compilation, dynamic analysis is a particular form of testing that often requires your program to be “instrumented” for it (i.e., modified at the binary level).
In Xcode, dynamic analysis is available through Instruments. You can found more information about it by googling for “xcode instruments tutorial“.
In short, you can run your program under dynamic analysis choosing “Running with Performance Tool” and choosing the kind of analysis you want to perform (memory leaks, memory allocation, performance, zombies, etc.). Instruments will show you in a graphical environment how memory usage evolves, or how long it takes for specific functions to perform, etc.