summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrank Meerkoetter <frank.meerkoetter@basyskom.com>2015-12-28 20:04:46 +0100
committerJędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>2015-12-30 10:02:48 +0000
commit982fefe69d5fd679e473bd7826aaf78a56779610 (patch)
tree5aa9ffce7a9e098389af550974a2e20e410bf4c7 /src
parent83da3e5edaf568b4a8c6aec8e0750fa45c726a27 (diff)
Cleanup memory owned by QTestTablePrivate
Since 7a42c8c15c59ef5fe84e6f293f2c97d38b85599c QTestTablePrivate no longer cleans up the memory it holds in dataList. This will make tools such as valgrind/address-sanitizer generate a lot of noise about directly or indirectly leaked memory. Change-Id: Ic0900ecdd7b76cda9f5366f3950bccde2f1b244c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/testlib/qtesttable.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testlib/qtesttable.cpp b/src/testlib/qtesttable.cpp
index d20bdd8467..05cce37a47 100644
--- a/src/testlib/qtesttable.cpp
+++ b/src/testlib/qtesttable.cpp
@@ -46,6 +46,11 @@ QT_BEGIN_NAMESPACE
class QTestTablePrivate
{
public:
+ ~QTestTablePrivate()
+ {
+ qDeleteAll(dataList.begin(), dataList.end());
+ }
+
struct Element {
Element() : name(Q_NULLPTR), type(0) {}
Element(const char *n, int t) : name(n), type(t) {}