This is an odd way to look at it. Swift’s structs and enums are allocated directly and lack reference counts, just like the analogous features in Rust. If you use a class, you will incur allocation and reference-count costs, just as you would in Rust if you use Arc<>. Rust does have the ability to have unique references and non-atomic references, which Swift does not currently, but those are on the roadmap.
15 Likes