use std::unique_ptr to replace boost::scope_ptr