3 ms·
Stacks are a fixed size. Unless you are running out of stack space there is no point in “freeing” memory from the stack. Where in the stack the stack pointer po
by _3u10 5y ago
Stacks are a fixed size. Unless you are running out of stack space there is no point in “freeing” memory from the stack. Where in the stack the stack pointer points has no bearing on stack size for any OS I’m aware of.
I’m assuming by string you mean a stack allocated array of char and not a std::string.
- varajelle 5y agoI meant a std::string on the stack, which is just a handle for more memory on the heap