|
|
|
|
|
by woolvalley
2673 days ago
|
|
Graphs are OK in reference counting languages like swift / objective-c, it doesn't have to be done with a GC. I think you could use Rc<Thing> in rust too if you want to solve it using rust, but then you have "swift with more boilerplate" as one friend said. |
|
Another actually more serious problem is that typical ref counting implementations mix the allocated data with the references, so that when you inc/dec the reference you dirty a cache line containing the data. There exist implementations which improve on this by storing the references in a separate part of memory, but they are not how it's commonly implemented.