Also, leaking memory with reference cycles from shared ownership
This seems to be a problem that even Swift can’t solve. The only languages that avoid this issue are ones with active GCs. Not that I don't agree and wouldn't love to see efforts made here.
It'd be possible to add an active GC to Rust. There are some library attempts at that:
- https://github.com/withoutboats/shifgrethor
But they don't look particularly usable.
Beyond that, yeah, it sucks.