From: Otto Date: Wed, 28 Apr 2021 11:01:54 +0000 (+0200) Subject: A class having virtual methods should have a virtual destructor X-Git-Tag: dnsdist-1.7.0-alpha1~122^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a523feebda04b7bcd8e979728eb2572bd2b7f504;p=thirdparty%2Fpdns.git A class having virtual methods should have a virtual destructor --- diff --git a/pdns/recursordist/logging.cc b/pdns/recursordist/logging.cc index b5da367fe4..ad796a8fea 100644 --- a/pdns/recursordist/logging.cc +++ b/pdns/recursordist/logging.cc @@ -135,6 +135,10 @@ namespace Logging Logger::Logger(std::shared_ptr parent, boost::optional name, size_t lvl, EntryLogger callback) : _parent(parent), _callback(callback), _name(name), _level(lvl) { } + + Logger::~Logger() + { + } }; std::shared_ptr g_slog{nullptr}; diff --git a/pdns/recursordist/logging.hh b/pdns/recursordist/logging.hh index b8517284a0..825ab36d03 100644 --- a/pdns/recursordist/logging.hh +++ b/pdns/recursordist/logging.hh @@ -83,6 +83,7 @@ namespace Logging { Logger(EntryLogger callback); Logger(EntryLogger callback, boost::optional name); Logger(std::shared_ptr parent, boost::optional name, size_t lvl, EntryLogger callback); + virtual ~Logger(); size_t getVerbosity() const; void setVerbosity(size_t verbosity);