From d45405908cd012e1ac1232dfe047785c2370b3b4 Mon Sep 17 00:00:00 2001 From: mes5k Date: Thu, 6 Apr 2006 06:44:26 +0000 Subject: [PATCH] patch for a mem leak in ArgException --- include/tclap/ArgException.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/tclap/ArgException.h b/include/tclap/ArgException.h index 9923f00..51cc266 100644 --- a/include/tclap/ArgException.h +++ b/include/tclap/ArgException.h @@ -78,7 +78,8 @@ class ArgException : public std::exception */ const char* what() const throw() { - std::string ex = _argId + " -- " + _errorText; + static std::string ex; + ex = _argId + " -- " + _errorText; return ex.c_str(); }