From: José Fonseca Date: Sun, 11 Sep 2011 22:42:16 +0000 (+0100) Subject: Plug Trace::String::value leak. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=e3f816248a479b0f2460b7d147774383610de936;p=apitrace Plug Trace::String::value leak. --- diff --git a/trace_model.cpp b/trace_model.cpp index 25dc4bb..306b9e7 100644 --- a/trace_model.cpp +++ b/trace_model.cpp @@ -42,6 +42,11 @@ Call::~Call() { } +String::~String() { + delete [] value; +} + + Struct::~Struct() { for (std::vector::iterator it = members.begin(); it != members.end(); ++it) { delete *it; diff --git a/trace_model.hpp b/trace_model.hpp index a284754..a74508e 100644 --- a/trace_model.hpp +++ b/trace_model.hpp @@ -190,6 +190,7 @@ class String : public Value { public: String(const char * _value) : value(_value) {} + ~String(); bool toBool(void) const; const char *toString(void) const;