3 ms·
Probably the same for the others; in D you have RAII but destruction is only deterministic for stack/static variables. There isn't deterministic destruction for
by ben-schaaf 4y ago
Probably the same for the others; in D you have RAII but destruction is only deterministic for stack/static variables. There isn't deterministic destruction for heap allocated stuff unless you count manually freeing.
- pjmlp 4y agoExcept the little detail that manual heap allocation with RAII is also a thing.
- gumby 4y agoThat case isn't completely deterministic the way stack is: for the stack you just shift the SP which is constant time, while heap allocation and deallocation require manipulation of a small database, possibly including a system call. This is a bit of hair splitting I admit.
- pjmlp 4y agoIt is as deterministic as RC algorithms, which is usually the point being discussed. Yep, splitting hairs. :)
- ben-schaaf 4y agoIn which case you're no longer using the GC. You don't have GC & deterministic destruction, you have GC xor determinism.