diff options
author | 2016-01-26 13:38:11 -0800 | |
---|---|---|
committer | 2016-01-26 13:38:11 -0800 | |
commit | bee33b0f5243defae6d445b06ccbd4646383d0b4 (patch) | |
tree | e6090369766d570b089b841a7ae198f3a0202ff3 | |
parent | 6236718f158654c99b2c2eb52b1e991ce3195c28 (diff) | |
parent | cc2ca6e88bc51fb71cd48725865671d0b69fe64f (diff) |
Merge pull request #4695 from bogdandrutu/master
Add a virtual destructor for the ClientContext::GlobalCallbacks.
-rw-r--r-- | include/grpc++/client_context.h | 1 | ||||
-rw-r--r-- | src/cpp/client/client_context.cc | 3 | ||||
-rw-r--r-- | src/cpp/server/server.cc | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index 25eeb3876f..4e8776e3be 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -286,6 +286,7 @@ class ClientContext { /// a client context is constructed and destructed. class GlobalCallbacks { public: + virtual ~GlobalCallbacks() {} virtual void DefaultConstructor(ClientContext* context) = 0; virtual void Destructor(ClientContext* context) = 0; }; diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 2aa532808c..710d7cb5c2 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ namespace grpc { class DefaultGlobalClientCallbacks GRPC_FINAL : public ClientContext::GlobalCallbacks { public: + ~DefaultGlobalClientCallbacks() GRPC_OVERRIDE {} void DefaultConstructor(ClientContext* context) GRPC_OVERRIDE {} void Destructor(ClientContext* context) GRPC_OVERRIDE {} }; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 878775bbee..458fb322b1 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,6 +53,7 @@ namespace grpc { class DefaultGlobalCallbacks GRPC_FINAL : public Server::GlobalCallbacks { public: + ~DefaultGlobalCallbacks() GRPC_OVERRIDE {} void PreSynchronousRequest(ServerContext* context) GRPC_OVERRIDE {} void PostSynchronousRequest(ServerContext* context) GRPC_OVERRIDE {} }; |