From b4e4586e8b7d4fbb9edc718c100bed2d7da164af Mon Sep 17 00:00:00 2001 From: Bright Chen Date: Fri, 3 Nov 2023 22:11:44 +0800 Subject: [PATCH] Disallow copy and assign of Channel --- src/brpc/channel.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/brpc/channel.h b/src/brpc/channel.h index 0f1c0bbbdd..651c5084bb 100644 --- a/src/brpc/channel.h +++ b/src/brpc/channel.h @@ -153,7 +153,9 @@ friend class Controller; friend class SelectiveChannel; public: Channel(ProfilerLinker = ProfilerLinker()); - ~Channel(); + virtual ~Channel(); + + DISALLOW_COPY_AND_ASSIGN(Channel); // Connect this channel to a single server whose address is given by the // first parameter. Use default options if `options' is NULL.