Use smart pointers correctly

Use smart pointers correctly in C++ — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need to replace raw new/delete with smart pointers in this module so ownership is explicit.…
I need to replace raw new/delete with smart pointers in this module so ownership is explicit. Convert the ResourceManager constructor and destructor to use unique_ptr for owned resources and shared_ptr where ownership is shared across systems. Before I commit, check that copy and move semantics are correct and there are no manual deletes left. Target branch is feature/smart-ptrs, reviewers: Lina and Marco, deadline Friday.

Improve — make it easier to accept

+
Before I push this change to the game loop, make ownership obvious for reviewers: put a short note…
Before I push this change to the game loop, make ownership obvious for reviewers: put a short note at the top of ResourceManager explaining who owns each pointer, move the longest-lived objects into unique_ptr, expose only weak_ptr for observers, surface the one place that needed shared_ptr and why. Flag any functions that still accept raw pointers and explain the risk to a code reviewer.

Decide — diagnose the stuck moment

+
I just converted several raw pointers to shared_ptr and the frame rate dropped in the profiler. The…

I swapped some raw pointers to shared_ptr and now frame drop happens at runtime

I just converted several raw pointers to shared_ptr and the frame rate dropped in the profiler. The team is Alex on rendering and Priya on audio; I'm worried I introduced unexpected reference cycles or heavy copying. I cannot tell whether the slowdown is from reference-count overhead, a cycle keeping large objects alive, or extra copies in message passing. What is the most likely cause and the fastest way to diagnose and fix it?

Become — change the pattern

+
Over the last three projects we keep reverting pointer changes after subtle crashes or leaking…

We repeatedly misunderstand ownership and then revert dangerous deletes

Over the last three projects we keep reverting pointer changes after subtle crashes or leaking tests. I waste time tracing ownership and fear introducing cycles when I try to make ownership explicit. Where am I consistently losing time and credibility, and what single habit should I form to stop this? Prefer a concrete rule I can apply in code reviews and one checklist item for PRs.

Next to this one

Other programming language work people do in C++.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.