2018 blog post advocates index-handles over C/C++ pointers for memory management
A developer with over 15 years of experience in large C++ codebases describes replacing raw and smart pointers with 'index-handles' as a technique for dynamic memory management. The post, updated in November 2018, adds a method using a per-slot generation counter to prevent 'handle collisions', building on an earlier discussion of pointer- and allocation-free programming.
GoKawiil's interpretation of the reporting above, not reported fact.
The author argues that traditional smart-pointer-heavy object graphs in large C++ projects cause performance problems from cache misses, memory fragmentation, and hard-to-detect 'fake leaks', suggesting that index-handle patterns could mitigate these issues. This reflects a broader movement in systems programming toward data-oriented design, though the author notes the approach conflicts with classical object-oriented architectures and may be harder to retrofit into existing codebases.
- Index-handles are proposed as an alternative to raw and smart pointers in C/C++ memory management.
- A per-slot generation counter is introduced to prevent handle collisions.
- The approach aims to address cache-miss performance issues and 'fake leaks' common in object-heavy C++ codebases.
Source: floooh.github.io, 2026-11-03
Published there as: “Handles are the better pointers (2018)”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.