diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h index 418924a70a4..8206c34ffe3 100644 --- a/src/core/lib/gprpp/memory.h +++ b/src/core/lib/gprpp/memory.h @@ -30,19 +30,6 @@ namespace grpc_core { -// TODO(veblush): Remove this after removing all usages. -template -inline T* New(Args&&... args) { - return new T(std::forward(args)...); -} - -// TODO(veblush): Remove this after removing all usages. -template -inline void Delete(T* p) { - delete p; -} - -// TODO(veblush): Remove this after removing all usages. class DefaultDeleteChar { public: void operator()(char* p) { @@ -51,21 +38,11 @@ class DefaultDeleteChar { } }; -// TODO(veblush): Remove this after removing all usages. -template -struct ResolveDeleter { - using deleter = std::default_delete; -}; -template <> -struct ResolveDeleter { - using deleter = DefaultDeleteChar; -}; - -// TODO(veblush): Remove this after removing all usages. -// This is equivalent to std::unique_ptr except that it uses gpr_free -// for deleter only for UniquePtr +// UniquePtr is only allowed for char and UniquePtr is deprecated +// in favor of std::string. UniquePtr is equivalent std::unique_ptr +// except that it uses gpr_free for deleter. template -using UniquePtr = std::unique_ptr::deleter>; +using UniquePtr = std::unique_ptr; // TODO(veblush): Replace this with absl::make_unique once abseil is added. template