Implement copy constructors

Implement copy constructors 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

+
A legacy asset container currently relies on the default shallow copy and leaks GPU handles when…
A legacy asset container currently relies on the default shallow copy and leaks GPU handles when duplicated. Implement a copy constructor for Mesh that performs deep copy of vertex buffers and duplicates GPU references correctly, leaves both objects usable, and documents the cost. Add unit tests that copy a mesh and then destroy the original to confirm the copy remains valid. Ladder L1

Improve — make it easier to accept

+
Before I add explicit copy constructors for resource classes, prepare the change to make reviewers…
Before I add explicit copy constructors for resource classes, prepare the change to make reviewers comfortable. Show which members need deep copy versus shared ownership, put the expensive operations and their costs up front, and flag places where copying should be prohibited instead of copied. Ladder L2

Decide — diagnose the stuck moment

+
A crash happened when two Mesh instances, one copied from the other, were destroyed; I suspect the…

Someone copied a Mesh and then the renderer crashed when both were destroyed

A crash happened when two Mesh instances, one copied from the other, were destroyed; I suspect the copy constructor performed a shallow copy of the GPU handle. I cannot tell whether other code depends on copy semantics being deep. What is the likely root cause and the safest immediate fix to prevent double-free, and how to audit other copies in the codebase? Ladder L5

Become — change the pattern

+
Historically the codebase lets heavy resource objects be implicitly copyable, causing crashes and…

We routinely accept implicit copies of heavy objects and later get performance or correctness bugs

Historically the codebase lets heavy resource objects be implicitly copyable, causing crashes and performance issues as teams duplicate meshes or textures without thinking. What habit should we change across the team: should we make resource types non-copyable by default, document copy costs, add tooling or linters to detect accidental copies, and how to migrate existing code with minimal churn? Ladder L6

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.