News for hackers. Stuff that matters.
Re:Handles Are the Better Pointers by loeg on Wednesday June 21, 2023 @01:31PM (#36421638)
We use something like this in a newish C++ project I work on. Our handle system just registers arbitrary pointers (we sometimes follow the convention of grouping items of the same type into a single allocation, and sometimes don't, and the handle-arbitrary pointer system tolerates both). It basically makes it explicit who owns a pointer and who doesn't; and non-owners need to tolerate that pointer having been freed by the time they access it.

There are no comments on this comment yet.