diff --git a/cpp/include/Ice/Endpoint.h b/cpp/include/Ice/Endpoint.h index 937de25ba62..e715706737e 100644 --- a/cpp/include/Ice/Endpoint.h +++ b/cpp/include/Ice/Endpoint.h @@ -145,6 +145,7 @@ namespace Ice class ICE_API TCPEndpointInfo final : public IPEndpointInfo { public: + ~TCPEndpointInfo() final; TCPEndpointInfo(const TCPEndpointInfo&) = delete; TCPEndpointInfo& operator=(const TCPEndpointInfo&) = delete; @@ -179,6 +180,7 @@ namespace Ice class ICE_API UDPEndpointInfo final : public IPEndpointInfo { public: + ~UDPEndpointInfo() final; UDPEndpointInfo(const UDPEndpointInfo&) = delete; UDPEndpointInfo& operator=(const UDPEndpointInfo&) = delete; @@ -216,6 +218,7 @@ namespace Ice class ICE_API WSEndpointInfo final : public EndpointInfo { public: + ~WSEndpointInfo() final; WSEndpointInfo(const WSEndpointInfo&) = delete; WSEndpointInfo& operator=(const WSEndpointInfo&) = delete; @@ -240,6 +243,7 @@ namespace Ice class ICE_API OpaqueEndpointInfo final : public EndpointInfo { public: + ~OpaqueEndpointInfo() final; OpaqueEndpointInfo(const OpaqueEndpointInfo&) = delete; OpaqueEndpointInfo& operator=(const OpaqueEndpointInfo&) = delete; diff --git a/cpp/include/Ice/SSL/EndpointInfo.h b/cpp/include/Ice/SSL/EndpointInfo.h index 237b281346c..52a4c5bc977 100644 --- a/cpp/include/Ice/SSL/EndpointInfo.h +++ b/cpp/include/Ice/SSL/EndpointInfo.h @@ -23,6 +23,7 @@ namespace Ice::SSL class ICE_API EndpointInfo final : public Ice::EndpointInfo { public: + ~EndpointInfo() final; EndpointInfo(const EndpointInfo&) = delete; EndpointInfo& operator=(const EndpointInfo&) = delete; diff --git a/cpp/include/Ice/ios/iAPEndpointInfo.h b/cpp/include/Ice/ios/iAPEndpointInfo.h index c6019ff5fda..a7f6b2fe8d9 100644 --- a/cpp/include/Ice/ios/iAPEndpointInfo.h +++ b/cpp/include/Ice/ios/iAPEndpointInfo.h @@ -16,6 +16,7 @@ namespace IceIAP class EndpointInfo final : public Ice::EndpointInfo { public: + ~EndpointInfo() final; EndpointInfo(const EndpointInfo&) = delete; EndpointInfo& operator=(const EndpointInfo&) = delete; diff --git a/cpp/include/IceBT/EndpointInfo.h b/cpp/include/IceBT/EndpointInfo.h index 401e1637a86..56c008bfc73 100644 --- a/cpp/include/IceBT/EndpointInfo.h +++ b/cpp/include/IceBT/EndpointInfo.h @@ -25,6 +25,7 @@ namespace IceBT class ICEBT_API EndpointInfo final : public Ice::EndpointInfo { public: + ~EndpointInfo() final; EndpointInfo(const EndpointInfo&) = delete; EndpointInfo& operator=(const EndpointInfo&) = delete; diff --git a/cpp/src/Ice/EndpointI.cpp b/cpp/src/Ice/EndpointI.cpp index c6b1cb1f19e..e6c18692a8b 100644 --- a/cpp/src/Ice/EndpointI.cpp +++ b/cpp/src/Ice/EndpointI.cpp @@ -37,6 +37,14 @@ Ice::EndpointInfo::secure() const noexcept return underlying ? underlying->secure() : false; } +Ice::TCPEndpointInfo::~TCPEndpointInfo() {} + +Ice::UDPEndpointInfo::~UDPEndpointInfo() {} + +Ice::WSEndpointInfo::~WSEndpointInfo() {} + +Ice::OpaqueEndpointInfo::~OpaqueEndpointInfo() {} + void IceInternal::EndpointI::streamWrite(Ice::OutputStream* s) const { diff --git a/cpp/src/Ice/SSL/SSLEndpointI.cpp b/cpp/src/Ice/SSL/SSLEndpointI.cpp index 145939ae8f4..9973260c7fe 100644 --- a/cpp/src/Ice/SSL/SSLEndpointI.cpp +++ b/cpp/src/Ice/SSL/SSLEndpointI.cpp @@ -76,6 +76,11 @@ Ice::SSL::OpenSSLConnectionInfo::~OpenSSLConnectionInfo() } #endif +Ice::SSL::EndpointInfo::~EndpointInfo() +{ + // out of line to avoid weak vtable +} + Ice::SSL::EndpointI::EndpointI(const InstancePtr& instance, const IceInternal::EndpointIPtr& del) : _instance(instance), _delegate(del) diff --git a/cpp/src/Ice/ios/iAPEndpointI.mm b/cpp/src/Ice/ios/iAPEndpointI.mm index 92f89172680..203894a824a 100644 --- a/cpp/src/Ice/ios/iAPEndpointI.mm +++ b/cpp/src/Ice/ios/iAPEndpointI.mm @@ -78,6 +78,7 @@ ICEIAP_API void registerIceIAP(bool loadOnInitialize) // Implement virtual destructors out of line to avoid weak vtables. IceIAP::ConnectionInfo::~ConnectionInfo() {} +IceIAP::EndpointInfo::~EndpointInfo() {} IceObjC::iAPEndpointI::iAPEndpointI( const ProtocolInstancePtr& instance, diff --git a/cpp/src/IceBT/EndpointI.cpp b/cpp/src/IceBT/EndpointI.cpp index f5416267110..ee6103c455c 100644 --- a/cpp/src/IceBT/EndpointI.cpp +++ b/cpp/src/IceBT/EndpointI.cpp @@ -23,6 +23,7 @@ using namespace IceBT; // Implement virtual destructors out of line to avoid weak vtables. IceBT::ConnectionInfo::~ConnectionInfo() {} +IceBT::EndpointInfo::~EndpointInfo() {} IceBT::EndpointI::EndpointI( const InstancePtr& instance,