fix memory leak bugs, use auto_ptr replace pointer
fix memory leak bugs, use auto_ptr replace pointer