Hacker News new | ask | show | jobs
by w4rh4wk5 261 days ago
For situations like this, I prefer a generational index where the lookup fails if the object has been destroyed. For context, the "manager" that holds the objects referred to typically has a lifetime of the whole program.