4 ms·
Pointers aren't just heap specific. Pointers are a language type that can reference memory address ( stack, heap, null or anywhere really ). It's why you can h
by porpoisely 8y ago
Pointers aren't just heap specific. Pointers are a language type that can reference memory address ( stack, heap, null or anywhere really ).
It's why you can have stack overflow, heap overflow, etc via pointer bugs.
Also, C/C++/etc runtimes don't have garbage collection but that's a runtime issue not a language specific issue/type system issue.
I think you have a good understanding of pointers, but you are mistakenly confining it to the heap or the runtime. Pointers part of the language and the type system.