Skip to main content

Practice · 1 of 2

Pimpl Lifecycle Discipline

CHALLENGE
Difficulty: advanced+25 XP

Implement Widget's pimpl correctly: constructor allocates, destructor destroys exactly once, move steals and nulls the source (double-move-safe: moving twice must not crash), and every operation is safe on an empty (moved-from) instance.

Back to lesson: Practice: Practice: ABI-Stable Patterns