Skip to content
Snippets Groups Projects
Commit 06dd04cf authored by Craig Tiller's avatar Craig Tiller
Browse files

Further review feedback

parent 8352b9e9
No related branches found
No related tags found
No related merge requests found
...@@ -60,12 +60,10 @@ class DefaultGlobalCallbacks GRPC_FINAL : public Server::GlobalCallbacks { ...@@ -60,12 +60,10 @@ class DefaultGlobalCallbacks GRPC_FINAL : public Server::GlobalCallbacks {
static Server::GlobalCallbacks* g_callbacks = nullptr; static Server::GlobalCallbacks* g_callbacks = nullptr;
static gpr_once g_once_init_callbacks = GPR_ONCE_INIT; static gpr_once g_once_init_callbacks = GPR_ONCE_INIT;
static void DeleteGlobalCallbacks() { delete g_callbacks; }
static void InitGlobalCallbacks() { static void InitGlobalCallbacks() {
if (g_callbacks == nullptr) { if (g_callbacks == nullptr) {
g_callbacks = new DefaultGlobalCallbacks(); static DefaultGlobalCallbacks default_global_callbacks;
atexit(DeleteGlobalCallbacks); g_callbacks = &default_global_callbacks;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment