Static analysis examines source code without executing it, finding issues like unused variables, dead code, and potential array bounds violations. Memory leaks are dynamic runtime anomalies caused by improper allocation/deallocation during execution, which are detected via dynamic testing rather than static analysis.