You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2016/10/11 18:42:49 UTC

[trafficserver] branch master updated: TS-4953: Memory leaks in priority queue test

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  5b19014   TS-4953: Memory leaks in priority queue test
5b19014 is described below

commit 5b1901410e04ff76a8e508b848c7a6cd53175a07
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue Oct 11 10:49:48 2016 -0700

    TS-4953: Memory leaks in priority queue test
---
 lib/ts/test_PriorityQueue.cc | 78 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/lib/ts/test_PriorityQueue.cc b/lib/ts/test_PriorityQueue.cc
index 10d82ac..f1c041d 100644
--- a/lib/ts/test_PriorityQueue.cc
+++ b/lib/ts/test_PriorityQueue.cc
@@ -74,6 +74,10 @@ REGRESSION_TEST(PriorityQueue_1)(RegressionTest *t, int /* atype ATS_UNUSED */,
 
   pq->pop();
   box.check(pq->top() == NULL, "top should be NULL");
+
+  delete pq;
+  delete a;
+  delete entry_a;
 }
 
 // Increase weight
@@ -107,6 +111,16 @@ REGRESSION_TEST(PriorityQueue_2)(RegressionTest *t, int /* atype ATS_UNUSED */,
   pq->update(entry_b, true);
 
   box.check(pq->top() == entry_c, "top should be entry_c");
+
+  delete pq;
+
+  delete a;
+  delete b;
+  delete c;
+
+  delete entry_a;
+  delete entry_b;
+  delete entry_c;
 }
 
 // Decrease weight
@@ -140,6 +154,16 @@ REGRESSION_TEST(PriorityQueue_3)(RegressionTest *t, int /* atype ATS_UNUSED */,
   pq->update(entry_c, false);
 
   box.check(pq->top() == entry_c, "top should be entry_c");
+
+  delete pq;
+
+  delete a;
+  delete b;
+  delete c;
+
+  delete entry_a;
+  delete entry_b;
+  delete entry_c;
 }
 
 // Push, top, and pop 9 entries
@@ -200,6 +224,28 @@ REGRESSION_TEST(PriorityQueue_4)(RegressionTest *t, int /* atype ATS_UNUSED */,
   pq->pop();
 
   box.check(pq->top() == NULL, "top should be NULL");
+
+  delete pq;
+
+  delete a;
+  delete b;
+  delete c;
+  delete d;
+  delete e;
+  delete f;
+  delete g;
+  delete h;
+  delete i;
+
+  delete entry_a;
+  delete entry_b;
+  delete entry_c;
+  delete entry_d;
+  delete entry_e;
+  delete entry_f;
+  delete entry_g;
+  delete entry_h;
+  delete entry_i;
 }
 
 // // Push, top, pop, and update 9 entries
@@ -276,6 +322,28 @@ REGRESSION_TEST(PriorityQueue_5)(RegressionTest *t, int /* atype ATS_UNUSED */,
   pq->pop();
 
   box.check(pq->top() == NULL, "top should be NULL");
+
+  delete pq;
+
+  delete a;
+  delete b;
+  delete c;
+  delete d;
+  delete e;
+  delete f;
+  delete g;
+  delete h;
+  delete i;
+
+  delete entry_a;
+  delete entry_b;
+  delete entry_c;
+  delete entry_d;
+  delete entry_e;
+  delete entry_f;
+  delete entry_g;
+  delete entry_h;
+  delete entry_i;
 }
 
 // Test erase method
@@ -306,4 +374,14 @@ REGRESSION_TEST(PriorityQueue_6)(RegressionTest *t, int /* atype ATS_UNUSED */,
   pq->erase(entry_b);
   box.check(pq->top() == NULL, "top should be NULL");
   box.check(pq->empty(), "should be empty");
+
+  delete pq;
+
+  delete a;
+  delete b;
+  delete c;
+
+  delete entry_a;
+  delete entry_b;
+  delete entry_c;
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].