What I don't understand is, people say when the current stack frame is returned, meaning under the hood in assembly, the esp moves up, so the memory in the stack frame will be freed.
How exactly does this chunk of memory get freed after moving the esp pointer? by runtime or os by checking nothing points at them?