4 ms·
Is rust borrowing any kind of code from what is used for objective C ARC technology relative to detecting the lifetime of a variable and automaticaly freeing th
by bsaul 13y ago
Is rust borrowing any kind of code from what is used for objective C ARC technology relative to detecting the lifetime of a variable and automaticaly freeing the resource ? Is it a common known algorithm ?
- steveklabnik 13y agoEverything is written in Rust, so we're not borrowing the code. Reference counting is very common: http://en.wikipedia.org/wiki/Reference_counting http://en.wikipedia.org/wiki/Reference_counting
- bsaul 13y agoI had the impression that rust and ARC were doing a bit of static code analysis to detect when a "reference count decrease/increase" could be performed ( thus the "automatic" part in ARC), and insert code at compile time. Which seems a bit more complicated than simply decrease them dynamically when a pointing is object is destroyed. But now that i come to think of it, things look a little blurry for me on that part.