mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
7 lines
136 B
C++
7 lines
136 B
C++
#include <memory>
|
|||
|
|||
void wrap_raw() {
|
|||
std::unique_ptr<int> ptr(new int(42));
|
|||
// unique_ptr manages the raw pointer — no leak
|
|||
}
|