diff --git a/mcrouter/CarbonRouterInstance-inl.h b/mcrouter/CarbonRouterInstance-inl.h index 32773a81..bfb385f0 100644 --- a/mcrouter/CarbonRouterInstance-inl.h +++ b/mcrouter/CarbonRouterInstance-inl.h @@ -18,10 +18,6 @@ #include #include -#ifndef MCROUTER_OSS_BUILD -#include -#endif - #include "mcrouter/AsyncWriter.h" #include "mcrouter/CarbonRouterInstanceBase.h" #include "mcrouter/ExecutorObserver.h" @@ -131,15 +127,8 @@ CarbonRouterInstance* CarbonRouterInstance::createRaw( initFailureLogger(); } - // Deleter is only called if unique_ptr::get() returns non-null. - auto deleter = [](CarbonRouterInstance* inst) { -#ifdef MCROUTER_OSS_BUILD - FB_LOG_EVERY_MS(WARNING, 10000) << "Destroying CarbonRouterInstance"; -#else - LOG_EVERY_MS(WARNING, 10000) << "Destroying CarbonRouterInstance"; -#endif - delete inst; - }; + // Custom deleter since ~CarbonRouterInstance() is private. + auto deleter = [](CarbonRouterInstance* inst) { delete inst; }; auto router = std::unique_ptr, decltype(deleter)>( new CarbonRouterInstance(std::move(input_options)),