public void Dispose() { PortToServer.Remove(Port); if (m_Disposed) { return; } m_Disposed = true; if (m_BufferHandle.IsAllocated) { m_BufferHandle.Free(); } AddressSpace.AddressToMethod.Dispose(); AddressSpace = null; m_Socket.Dispose(); }
void Dispose(bool disposing) { if (m_Disposed) { return; } m_Disposed = true; PortToServer.Remove(Port); if (m_BufferHandle.IsAllocated) { m_BufferHandle.Free(); } if (disposing) { AddressSpace.AddressToMethod.Dispose(); AddressSpace = null; m_Socket.Dispose(); } }