| title | C26409 | |
|---|---|---|
| ms.date | 07/21/2017 | |
| ms.topic | conceptual | |
| f1_keywords |
|
|
| helpviewer_keywords |
|
|
| ms.assetid | a3b3a229-d566-4be3-bd28-2876ccc8dc37 |
Even if code is clean of calls to malloc() and free() we still suggest that you consider better options than explicit use of operators new and delete.
C++ Core Guidelines: R.11: Avoid calling new and delete explicitly
The ultimate fix is to start using smart pointers with appropriate factory functions, such as std::make_unique.
- The checker warns on calls to any kind of operator
newordelete: scalar, vector, overloaded versions (global and class-specific), as well as on placement versions. The latter case may require some clarifications on the Core Guidelines in terms of suggested fixes and may be omitted in the future.