Skip to main content

Practice · 2 of 2

Opaque-Handle Factory Contract

CHALLENGE
Difficulty: advanced+25 XP

Implement the extern "C"-style factory contract (linkage-free in this harness): wapiCreate/WapiDestroy manage an opaque handle, and the versioned WidgetApi table exposes only v1 calls. Destroy must be idempotent (destroying twice is a no-op, not a double free).

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