envoyproxy/envoy

Consistently use make_shared, make_unique utilities to avoid potential memory leaks

Open

#14,044 创建于 2020年11月16日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)C++ (5,373 fork)batch import
help wantedtech debt

仓库指标

Star
 (27,997 star)
PR 合并指标
 (平均合并 8天) (30 天内合并 378 个 PR)

描述

Currently in code there is no consistent strategy for creating new objects wrapped into smart pointers. Is it recommended to use make_shared, make_unique utils to gracefully handle exceptions upon object construction: https://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared https://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique

Example of code to be fixed: https://github.com/envoyproxy/envoy/blob/master/test/integration/clusters/custom_static_cluster.cc#L25

贡献者指南