3 ms·
developing in Java with awareness of the GC doesn't mean tracking allocation and deallocation of memory, it means developers should avoid allocating lots of new
by itronitron 9y ago
developing in Java with awareness of the GC doesn't mean tracking allocation and deallocation of memory, it means developers should avoid allocating lots of new Objects when possible. In practice this means creating view, cursor, or offset type Objects that map to arrays of more primitive data types.
- tibbetts 9y agoExactly. Developing GC aware code is still easier and safer than c++ memory management. Particularly because when you screw up in c++ you get crashes or data loss, and when you screw up in Java you mostly just get GC pauses.
- MaxBarraclough 9y agoMandatory mention of D and its @nogc feature (as it sounds, a compile-time guarantee that a function doesn't allocate on the garbage-collected heap) https://dlang.org/blog/2017/06/16/life-in-the-fast-lane/ https://dlang.org/blog/2017/06/16/life-in-the-fast-lane/