3 ms·
Is there any cross platform language that does it like Objective C w/ ARC? I find that one a pretty good balance between being able to go nitty gritty with opt
by m_mueller 12y ago
Is there any cross platform language that does it like Objective C w/ ARC? I find that one a pretty good balance between being able to go nitty gritty with optimisations while not having to care about memory management details for the standard use cases. IMO it's also much easier to learn than C++. Could Rust be the answer?
- yoklov 12y agoC++ std::shared_ptr does the same thing as ARC (reference counting based on scope/lifetime). Rust probably has something similar in it's standard library. FWIW I wouldn't use reference counting in game development if I could avoid it, because it has pretty bad performance characteristics as well (the only thing it really has over GC is that it's deterministic, and that, with the exception of in Objective C, you can choose where and where not to use it).
- maccard 12y agoMost games don't do any heap allocations at al during runtime(or at least very very few), so you shouldn't/don't end up with garbage collector pauses during normal gameplay. If you refcount your main structures, they can be auto cleaned up /removed when changing levels/loading scenes/swapping chunks out on the fly.