Change to the correct data type (#4343)

pull/4233/head^2
Mikhail Ostashchenko 1 year ago committed by GitHub
parent 3b7e5d5ce2
commit 5cff162a94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/data/roadmaps/cpp/content/105-pointers-and-references/raw-pointers/101-memory-leakage.md

@ -22,7 +22,7 @@ For example, this code will not have a memory leak:
#include <memory>
void no_memory_leak() {
std::shared_ptr<int> ptr = std::make_shared<int[]>(100); // Allocating memory in the heap for an array of integers using shared_ptr
std::shared_ptr<int[]> ptr = std::make_shared<int[]>(100); // Allocating memory in the heap for an array of integers using shared_ptr
// Some code...
} // shared_ptr goes out of scope and it will automatically deallocate the memory block assigned to it.
```
```

Loading…
Cancel
Save