- If this object is returned by reference or smart pointer, the
boost::program_options::options_description::add() method will delete it
causing double free on that object. So we prevent any problem by not exposing
the underlying object
/**
* @return The underlining @c boost::program_options::option_description object.
*/
-shared_ptr<option_description> ConfigurationOption::get_option_description()
+option_description ConfigurationOption::get_option_description()
{
- return shared_ptr<option_description>( &option );
+ return option;
}
/**
);
virtual ~ConfigurationOption();
- boost::shared_ptr< boost::program_options::option_description > get_option_description();
+ boost::program_options::option_description get_option_description();
std::string get_command_string() const;
std::string get_command_description() const;