When are variables removed from memory in C++?

前端 未结 11 1162
梦如初夏
梦如初夏 2020-12-16 06:54

I\'ve been using C++ for a bit now. I\'m just never sure how the memory management works, so here it goes:

I\'m first of all unsure how memory is unallocated in a fu

11条回答
  •  孤城傲影
    2020-12-16 07:30

    Please see my answer to this question. It may clear up a lot of things for oyu.

    How does automatic memory allocation actually work in C++?

    I'm not just posting a link for giggles. My answer there is an in-depth look (at a very introductory level) how memory management works.

提交回复
热议问题