diff options
author | Tobias Markmann <tm@ayena.de> | 2016-09-29 09:15:12 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-09-29 09:31:53 (GMT) |
commit | c966e43b2852e69da1ed3cac9e11c1b026d4f4a9 (patch) | |
tree | 006ee4058a289a59a6f7fa1604903fd11c2d6d4a /Swiften/Serializer | |
parent | 871c8955ae39e3eeb76a1bb72bf574764f5c30c3 (diff) | |
download | swift-c966e43b2852e69da1ed3cac9e11c1b026d4f4a9.zip swift-c966e43b2852e69da1ed3cac9e11c1b026d4f4a9.tar.bz2 |
Fix potential resource leaks
IDGenerator was missing the virtual keyword on its method
which is reimplemented by SimpleIDGenerator.
Some other classes were missing destructors or virtual
destructors.
Test-Information:
Builds on macOS 10.12 with Qt 5.5.1, all unit tests pass.
Change-Id: I482bc249578d38a922256d1fa5241515ce45d0c0
Diffstat (limited to 'Swiften/Serializer')
-rw-r--r-- | Swiften/Serializer/PayloadSerializerCollection.cpp | 3 | ||||
-rw-r--r-- | Swiften/Serializer/PayloadSerializerCollection.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Serializer/PayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializerCollection.cpp index dd20364..114512e 100644 --- a/Swiften/Serializer/PayloadSerializerCollection.cpp +++ b/Swiften/Serializer/PayloadSerializerCollection.cpp @@ -17,6 +17,9 @@ namespace Swift { PayloadSerializerCollection::PayloadSerializerCollection() { } +PayloadSerializerCollection::~PayloadSerializerCollection() { +} + void PayloadSerializerCollection::addSerializer(PayloadSerializer* serializer) { serializers_.push_back(serializer); } diff --git a/Swiften/Serializer/PayloadSerializerCollection.h b/Swiften/Serializer/PayloadSerializerCollection.h index a0fe2ea..53b3135 100644 --- a/Swiften/Serializer/PayloadSerializerCollection.h +++ b/Swiften/Serializer/PayloadSerializerCollection.h @@ -15,10 +15,10 @@ namespace Swift { class PayloadSerializer; - class SWIFTEN_API PayloadSerializerCollection { public: PayloadSerializerCollection(); + virtual ~PayloadSerializerCollection(); void addSerializer(PayloadSerializer* factory); void removeSerializer(PayloadSerializer* factory); |