diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h index 2e7658e4866..be158d118a1 100644 --- a/src/core/lib/gprpp/memory.h +++ b/src/core/lib/gprpp/memory.h @@ -30,6 +30,9 @@ // Add this to a class that want to use Delete(), but has a private or // protected destructor. +// Should not be used in new code. +// TODO(juanlishen): Remove this macro, and instead comment that the public dtor +// should not be used directly. #define GRPC_ALLOW_CLASS_TO_USE_NON_PUBLIC_DELETE \ template \ friend void ::grpc_core::Delete(_Delete_T*); \ @@ -38,6 +41,9 @@ // Add this to a class that want to use New(), but has a private or // protected constructor. +// Should not be used in new code. +// TODO(juanlishen): Remove this macro, and instead comment that the public dtor +// should not be used directly. #define GRPC_ALLOW_CLASS_TO_USE_NON_PUBLIC_NEW \ template \ friend _New_T* grpc_core::New(_New_Args&&...);