From e281b226bfb0bc4b6457e681af05ab644b35e278 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Thu, 11 Jan 2018 10:49:39 -0500 Subject: [PATCH] fix test memory leak --- src/autotests/HistoryTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/autotests/HistoryTest.cpp b/src/autotests/HistoryTest.cpp index 078d93a1..ae729fd2 100644 --- a/src/autotests/HistoryTest.cpp +++ b/src/autotests/HistoryTest.cpp @@ -109,6 +109,8 @@ void HistoryTest::testHistoryScroll() QCOMPARE(historyTypeNone.isUnlimited(), false); QCOMPARE(historyTypeNone.maximumLineCount(), 0); + delete historyScroll; + // File historyScroll = new HistoryScrollFile(QStringLiteral("test.log")); QVERIFY(historyScroll->hasScroll()); @@ -121,6 +123,8 @@ void HistoryTest::testHistoryScroll() QCOMPARE(historyTypeFile.isUnlimited(), true); QCOMPARE(historyTypeFile.maximumLineCount(), -1); + delete historyScroll; + // Compact historyScroll = new CompactHistoryScroll(42); QVERIFY(historyScroll->hasScroll());