2 ms·
> From my understanding of the article's premise, a key part is whether the memory management is automatic or not. In C, everything on the heap is manual, you h
by arghwhat 8y ago
> From my understanding of the article's premise, a key part is whether the memory management is automatic or not. In C, everything on the heap is manual, you have to explicitly free and ensure it lives long enough for all owners and borrowers
But everything on the stack is automatic, so by this definition any type of automatic memory management being a "GC", then C has a GC (stack), paired with an unsafe mode (heap).
- jashmatthews 8y ago> then C has a GC (stack) IIUC the C11 standards etc actually just say "automatic storage" and stacks are never specifically mentioned.
- arghwhat 8y agoAh, yes, I forgot the term. C goes to great lengths to avoid defining/touching machine details, which is quite ironic considering how it has gained reputation in this day and age as a very low-level language.