answersLogoWhite

0

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.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

JudyJudy
Simplicity is my specialty.
Chat with Judy
ReneRene
Change my mind. I dare you.
Chat with Rene
RossRoss
Every question is just a happy little opportunity.
Chat with Ross

Add your answer:

Earn +20 pts
Q: What is difference between Static analysis and Dynamic analysis?
Write your answer...
Submit
Still have questions?
magnify glass
imp