Merge pull request #4695 from bogdandrutu/master

Add a virtual destructor for the ClientContext::GlobalCallbacks.
pull/4904/head
Alistair Veitch 9 years ago
commit bee33b0f52
  1. 1
      include/grpc++/client_context.h
  2. 3
      src/cpp/client/client_context.cc
  3. 3
      src/cpp/server/server.cc

@ -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;
};

@ -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 {}
};

@ -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 {}
};

Loading…
Cancel
Save