envoyproxy/envoy

Consistently use make_shared, make_unique utilities to avoid potential memory leaks

Open

#14 044 ouverte le 16 nov. 2020

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)C++ (5 373 forks)batch import
help wantedtech debt

Métriques du dépôt

Stars
 (27 997 stars)
Métriques de merge PR
 (Merge moyen 8j) (378 PRs mergées en 30 j)

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

Guide contributeur