Skip to content

Commit

Permalink
Merge pull request grpc#20981 from veblush/memory-legacy
Browse files Browse the repository at this point in the history
Add deprecated functions for internal usage
  • Loading branch information
veblush authored Nov 8, 2019
2 parents 438cfa7 + c569f98 commit 362ee6a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/core/lib/gprpp/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@

namespace grpc_core {

// TODO(veblush): Remove this after removing all usages.
template <typename T, typename... Args>
inline T* New(Args&&... args) {
return new T(std::forward<Args>(args)...);
}

// TODO(veblush): Remove this after removing all usages.
template <typename T>
inline void Delete(T* p) {
delete p;
}

// TODO(veblush): Remove this after removing all usages.
template <typename T>
using UniquePtr = std::unique_ptr<T>;

// TODO(veblush): Replace this with absl::make_unique once abseil is added.
template <typename T, typename... Args>
inline std::unique_ptr<T> MakeUnique(Args&&... args) {
Expand Down

0 comments on commit 362ee6a

Please sign in to comment.