CPPUCCINO// LAB

INTERACTIVE / 01 · OBJECT LIFETIME

LIFETIME TIMELINE

Step through the code. Watch the object die — and see exactly when a reference becomes a ghost.

STEP 0 / 5
SOURCE · ONE LINE AT A TIME
    RUNTIME STATE
    owner (unique_ptr) NOT CREATED
    r (reference) UNBOUND

    INTERACTIVE / INDEX

    FOUR WAYS TO BREAK C++

    Same rule every time: step the code, see the failure, repair it.
    每次都是同一条规则:走代码、看失败、再修好。