use std::unique_ptr instead of boost::scoped_ptr.