summaryrefslogtreecommitdiff
path: root/ui/qt/byte_view_text.h
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-12-22 14:51:08 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2015-12-22 20:43:02 +0000
commit299717879554ee2fc7d06fedded6207cfdcd1f22 (patch)
tree2c4b5008eec702b2223207ce3017472322bb5460 /ui/qt/byte_view_text.h
parent3bd69dac73b0c63e35cd2022344e6a357d90da43 (diff)
downloadwireshark-299717879554ee2fc7d06fedded6207cfdcd1f22.tar.gz
Qt: Plug memory leak in ByteViewText.
Each time we create a ByteViewText, which is twice when a packet is selected, the menu items leaks. Ensure we clear the items when done. Change-Id: Idf0c7b82bf241120dd4c42ba85c56c0a2bf8db46 Reviewed-on: https://code.wireshark.org/review/12826 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/byte_view_text.h')
-rw-r--r--ui/qt/byte_view_text.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/byte_view_text.h b/ui/qt/byte_view_text.h
index 89e3e6674d..c7958a58b5 100644
--- a/ui/qt/byte_view_text.h
+++ b/ui/qt/byte_view_text.h
@@ -43,6 +43,8 @@ class ByteViewText : public QAbstractScrollArea
Q_OBJECT
public:
explicit ByteViewText(QWidget *parent = 0, tvbuff_t *tvb = NULL, proto_tree *tree = NULL, QTreeWidget *protoTree = NULL, packet_char_enc encoding = PACKET_CHAR_ENC_CHAR_ASCII);
+ ~ByteViewText();
+
bool hasDataSource(const tvbuff_t *ds_tvb = NULL);
void setEncoding(packet_char_enc encoding);
void setFormat(bytes_view_type format);