Skip to content

Commit b5ebc65

Browse files
committed
modifications a higher acrolinx score
1 parent 414dd27 commit b5ebc65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/code-quality/c26840.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ ms.assetid: 2fbe9dc5-fa43-47b9-97a7-3f8215da1d40 # TODO (@carsonradtke): I gener
1212
1313
## Remarks
1414

15-
This warning indicates that the calling function has inconsistently allocated memory with one family of allocation functions, but freed it was a deallocation function from a different family. This usage is undefined behavior according to the C++ standard and the Microsoft C++ implementation.
15+
This warning indicates that the memory was allocated with one family of allocation functions, but was freed with a deallocation function from a different family. This usage is undefined behavior according to the C++ standard and the Microsoft C++ implementation.
1616

17-
The exact ramifications of this defect are difficult to predict. It might result in leaks for classes with destructors that perform memory de-allocation. It could cause inconsistent behavior for classes with destructors that perform some semantically significant operation, or memory corruptions and crashes when operators have been overridden. In other cases the mismatch might be unimportant, depending on the implementation of the compiler and its libraries. Analysis tools can't always distinguish between these situations.
17+
The exact ramifications of this defect are difficult to predict. It might result in leaks for classes with destructors that perform memory deallocation. It could cause inconsistent behavior for classes with destructors that perform semantically significant operations, or memory corruptions and crashes. In other cases the mismatch might be unimportant, depending on the implementation of the compiler and its libraries. Analysis tools can not always distinguish between these situations.
1818

1919
If memory is allocated with one family of allocation functions, it should be freed with a matching deallocation function.
2020

@@ -49,4 +49,4 @@ void g() {
4949
}
5050
```
5151

52-
Manual memory management has many pitfalls in terms of memory leaks and exceptions. To avoid these kinds of potential leaks altogether, use the mechanisms that are provided by the C++ Standard Library (STL). These include [`shared_ptr`](../standard-library/shared-ptr-class.md), [`unique_ptr`](../standard-library/unique-ptr-class.md), and containers such as [`vector`](../standard-library/vector.md). For more information, see [Smart pointers](../cpp/smart-pointers-modern-cpp.md) and [C++ Standard Library](../standard-library/cpp-standard-library-reference.md).
52+
Manual memory management has many pitfalls in terms of memory leaks and exceptions. To avoid these kinds of potential leaks altogether, use the mechanisms that are provided by the C++ Standard Library (STL). These mechanisms include [`shared_ptr`](../standard-library/shared-ptr-class.md), [`unique_ptr`](../standard-library/unique-ptr-class.md), and containers such as [`vector`](../standard-library/vector.md). For more information, see [Smart pointers](../cpp/smart-pointers-modern-cpp.md) and [C++ Standard Library](../standard-library/cpp-standard-library-reference.md).

0 commit comments

Comments
 (0)