4 ms·
Disagree, you can easily add validation to handle access with generations. The classic example in games is reusing pooled game elements where their lifetimes ar
by meheleventyone 3y ago
Disagree, you can easily add validation to handle access with generations. The classic example in games is reusing pooled game elements where their lifetimes are very dependent on gameplay. For example reusing enemies from a pool of them where their lifetime is dependent on when they get spawned and destroyed which can be chaotic. Here handles with generations preserve memory safety by preventing access to stale data.