Code Room
Code reviewMedium
Question
Review this C++ ownership hand-off with unique_ptr.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
#include <memory> struct Node { int v; }; void sink(Node* n) { // takes ownership and frees it delete n;} void run() { std::unique_ptr<Node> p = std::make_unique<Node>(); sink(p.get());}Run or narrate your approach, then ask the coach.