summaryrefslogtreecommitdiffstats
path: root/src/OSSupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/OSSupport')
-rw-r--r--src/OSSupport/UDPEndpointImpl.cpp9
-rw-r--r--src/OSSupport/UDPEndpointImpl.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/OSSupport/UDPEndpointImpl.cpp b/src/OSSupport/UDPEndpointImpl.cpp
index ece521ab8..31ca107ce 100644
--- a/src/OSSupport/UDPEndpointImpl.cpp
+++ b/src/OSSupport/UDPEndpointImpl.cpp
@@ -197,6 +197,15 @@ cUDPEndpointImpl::cUDPEndpointImpl(UInt16 a_Port, cUDPEndpoint::cCallbacks & a_C
+cUDPEndpointImpl::~cUDPEndpointImpl()
+{
+ Close();
+}
+
+
+
+
+
void cUDPEndpointImpl::Close(void)
{
if (m_Port == 0)
diff --git a/src/OSSupport/UDPEndpointImpl.h b/src/OSSupport/UDPEndpointImpl.h
index 75942b0cf..0e28d0b13 100644
--- a/src/OSSupport/UDPEndpointImpl.h
+++ b/src/OSSupport/UDPEndpointImpl.h
@@ -35,6 +35,8 @@ public:
If a_Port is 0, the OS is free to assign any port number it likes to the endpoint. */
cUDPEndpointImpl(UInt16 a_Port, cUDPEndpoint::cCallbacks & a_Callbacks);
+ ~cUDPEndpointImpl();
+
// cUDPEndpoint overrides:
virtual void Close(void) override;
virtual bool IsOpen(void) const override;