Hacker News new | past | comments | ask | show | jobs | submit login

> Double-frees are prevented by Vale's single ownership (in the C++ sense)

...wouldn't that also be prevented by the generation-check even if there is no single-ownership? Because once the referenced item is destroyed (and thus bumping that "memory slot's" generation counter) that item reference becomes invalid because the generation no longer matches, so the next attempt to release the item with that same reference should also fail?

One nice property of generational-indices is that they can be shared without compromising memory safety. As soon as the item is destroyed, all shared references in the wild automatically become invalid. But I guess single-ownership still makes a lot of sense for thread-safety :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: