Boost logo

Boost :

From: Vinitha Anish(UST,IN) (Vinitha.Anish_at_[hidden])
Date: 2019-09-24 10:17:34

Hi ,
Our static analyzer report an memory leak with add_options .
We use
namespace po = boost::program_options;
po::options_description desc("Options");
("name", po::value<std::string>(), ...) // add option

The issue reported in boost library file

   template<class T>
    value(T* v)
        typed_value<T>* r = new typed_value<T>(v);

        return r;

memory is dynamically allocated here and return at line 201.

Can anyone suggest how do we handle this memory leak.

Boost list run by bdawes at, gregod at, cpdaniel at, john at