summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-05 17:05:28 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-05 17:05:28 (GMT)
commit9b335b8ef317430a7551a8f2cb86a98b4c330882 (patch)
tree0c0e843fb53f93e2a6088a07a4bb6e6f66483580 /Swiften/LinkLocal/DNSSD
parent1873eca1f2147fa18f03fdd849fdd73d1a012be1 (diff)
downloadswift-9b335b8ef317430a7551a8f2cb86a98b4c330882.zip
swift-9b335b8ef317430a7551a8f2cb86a98b4c330882.tar.bz2
Swiften/LinkLocal: Avoid memory leak.
Diffstat (limited to 'Swiften/LinkLocal/DNSSD')
-rw-r--r--Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp6
-rw-r--r--Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp
index f7dfa11..c26f8ee 100644
--- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp
+++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.cpp
@@ -13,6 +13,12 @@ namespace Swift {
FakeDNSSDQuerier::FakeDNSSDQuerier(const String& domain) : domain(domain) {
}
+FakeDNSSDQuerier::~FakeDNSSDQuerier() {
+ if (!runningQueries.empty()) {
+ std::cerr << "FakeDNSSDQuerier: Running queries not empty at destruction time" << std::endl;
+ }
+}
+
boost::shared_ptr<DNSSDBrowseQuery> FakeDNSSDQuerier::createBrowseQuery() {
return boost::shared_ptr<DNSSDBrowseQuery>(new FakeDNSSDBrowseQuery(shared_from_this()));
}
diff --git a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h
index c67ba7b..22bca0c 100644
--- a/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h
+++ b/Swiften/LinkLocal/DNSSD/Fake/FakeDNSSDQuerier.h
@@ -23,6 +23,7 @@ namespace Swift {
public boost::enable_shared_from_this<FakeDNSSDQuerier> {
public:
FakeDNSSDQuerier(const String& domain);
+ ~FakeDNSSDQuerier();
void start() {}
void stop() {}