From 1a464b627fedc64793b4fd84a066fa415b2b689c Mon Sep 17 00:00:00 2001 From: Freddie Lamble Date: Wed, 29 Jul 2026 13:20:22 +0000 Subject: [PATCH] Add virtual destructor to rmqt::VHostInfo `rmqt::VHostInfo` declares virtual member functions, but didn't have a virtual destructor. Declare the destructor virtual to ensure correct destruction. --- src/rmq/rmqt/rmqt_vhostinfo.cpp | 2 ++ src/rmq/rmqt/rmqt_vhostinfo.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/rmq/rmqt/rmqt_vhostinfo.cpp b/src/rmq/rmqt/rmqt_vhostinfo.cpp index 85f1a717..c453e138 100644 --- a/src/rmq/rmqt/rmqt_vhostinfo.cpp +++ b/src/rmq/rmqt/rmqt_vhostinfo.cpp @@ -28,6 +28,8 @@ VHostInfo::VHostInfo(const bsl::shared_ptr endpoint, { } +VHostInfo::~VHostInfo() {} + bsl::shared_ptr VHostInfo::endpoint() const { return d_endpoint; diff --git a/src/rmq/rmqt/rmqt_vhostinfo.h b/src/rmq/rmqt/rmqt_vhostinfo.h index 4f5142ab..580e30af 100644 --- a/src/rmq/rmqt/rmqt_vhostinfo.h +++ b/src/rmq/rmqt/rmqt_vhostinfo.h @@ -36,6 +36,8 @@ class VHostInfo { VHostInfo(const bsl::shared_ptr endpoint, const bsl::shared_ptr credentials); + virtual ~VHostInfo(); + virtual bsl::shared_ptr endpoint() const; virtual bsl::shared_ptr credentials() const;