Making C++ safe without borrow checking, reference counting, or tracing GC

Adding memory safety to C++ can be a challenging task, but there are more than 11 methods available, according to Evan Ovadia, who has spent the last decade researching the subject. The most common methods are reference counting, borrow checking and tracing garbage collection, but there are alternatives including constraint references, generational references and random generational references. Ovadia suggests using borrowless affine style, which uses unique_ptr and owned values, and blends constraint references with generational and random generational references, along with simplified borrowing. He acknowledges that there are drawbacks to this approach, however, so suggests borrowing from the use of shared ownership as found in Rust, or areas and single-threaded RC as found in Vale.

To top