Deleting C++ pointers to an object

前端 未结 9 1190
攒了一身酷
攒了一身酷 2021-01-26 20:06

I thought that the delete command would free up memory I allocated. Can someone explain why it seems I still have the memory in use after delete?

class Test
{
pu         


        
9条回答
  •  迷失自我
    2021-01-26 20:43

    Undefined behavior is just that, undefined. It can even work if it so pleases.

提交回复
热议问题