memory leaking in TCLAP?

时间:2019-04-16 23:08:33

标签: c++ windows memory-leaks command-line-parsing visual-leak-detector

i'm trying to use 'tclap' (http://tclap.sourceforge.net/) library to parse command line arguments (since visual C++ does not support getopt). The lib seems to work fine but the memory leak detector (Visual Leak Detector) is reporting me a massive tclap-related leaking at the very "hello world"

#include "pch.h"
#include <iostream>
#include <stdio.h>
#include <vld.h>

#include "tclap/CmdLine.h"
int main(int argc, char **argv)
{
    try {
        TCLAP::CmdLine cmd("Serena Morena", ' ', "0.9");
        TCLAP::ValueArg<std::string> cl("a", "all", "Whatever", true, "diablo", "string");

        cmd.add(cl);
        cmd.parse(argc, argv);
    } catch (TCLAP::ArgException &e) {
        printf("What the hell?\n"); 
    }
    return 0;
}

Now, am i missing something or is tclap a serial leaker? Thanks in advance

0 个答案:

没有答案