3 ms·
GC is standalone runtime that does tracing and deallocates memory at some arbitrary time. Are you really claiming that using C++'s smart pointers is using GC? I
by mirekrusin 5y ago
GC is standalone runtime that does tracing and deallocates memory at some arbitrary time. Are you really claiming that using C++'s smart pointers is using GC? I think you're conflating semi/automatic memory management with GC.
- pjmlp 5y agoYou're conflating tracing GC algorithm with GC as CS concept. Regarding C++ smart pointers, if you manually call them like in std::shared_ptr<>(), no. If the runtime calls it for you like on C++/CX or compiler blessed types like _com_ptr_t, then surely.
- mirekrusin 5y agoARC in Swift doesn't have runtime part, retain/release code is injected at the compile time. It doesn't have ie. cycle detector running periodically or anything like that. If you define this setup as GC then by this definition Rust's borrow-checker is also a GC because it works the same way - by injecting static code during compilation (but has different rules).