aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/sctp_graph_dialog.cpp
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2018-07-21 00:14:01 +0300
committerPeter Wu <peter@lekensteyn.nl>2018-07-23 17:10:48 +0000
commit0890837669761a58f3f7b9164437a35ea1cf0562 (patch)
treecac32f19d0b22f3243ab6dfea4105b78594190ab /ui/qt/sctp_graph_dialog.cpp
parente3436d819a2824dc51862219242cd85ec997485c (diff)
SCTPGraphDialog: Clear internal vectors
Every time the graph is redrawn new items are added to the vectors but these items are never removed and the used memory increase over time which for larger captures could be problematic. Change-Id: I5f029d5f48e215aacf4a69fb7aef348d16df9846 Reviewed-on: https://code.wireshark.org/review/28782 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/qt/sctp_graph_dialog.cpp')
-rw-r--r--ui/qt/sctp_graph_dialog.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/qt/sctp_graph_dialog.cpp b/ui/qt/sctp_graph_dialog.cpp
index 4c77445be0..fe7c9cc6e0 100644
--- a/ui/qt/sctp_graph_dialog.cpp
+++ b/ui/qt/sctp_graph_dialog.cpp
@@ -332,6 +332,22 @@ void SCTPGraphDialog::drawGraph()
minTSN = selected_assoc->min_tsn2;
}
ui->sctpPlot->clearGraphs();
+ xt.clear();
+ yt.clear();
+ xs.clear();
+ ys.clear();
+ xg.clear();
+ yg.clear();
+ xd.clear();
+ yd.clear();
+ xn.clear();
+ yn.clear();
+ ft.clear();
+ fs.clear();
+ fg.clear();
+ fd.clear();
+ fn.clear();
+ typeStrings.clear();
switch (type) {
case 1: drawSACKGraph();
drawNRSACKGraph();