envoyproxy / envoyproxy/envoy

Consistently use make_shared, make_unique utilities to avoid potential memory leaks

Open
#14,044 1 comment 0 reactions 0 assignees View on GitHub
help wanted tech debt
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.