Use shared_ptr for analysis part.

Signed-off-by: CyberZHG <CyberZHG@gmail.com>