Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by avianlyric on Tuesday September 21, 2021 @01:02PM
(#28607112)
Using destructors just reference counting done the hard way.
> burn an unmeasurably small fraction of runtime
That’s also known as a very short pause.
C++ has destructors, and owning pointers (called "unique_ptr"), and also arena allocators for when those are useful. Rust has its Drop trait and analogs of the other things. (Use of arenas with Rust standard library containers is approaching maturity.) They make memory management automatic and wholly painless. Both languages offer reference-counted GC for places where that is helpful, but such places are rare, and where used typically burn an unmeasurably small fraction of runtime, with no "pauses".