C++ delete - It deletes my objects but I can still access the data?

前端 未结 13 1851
礼貌的吻别
礼貌的吻别 2020-11-21 06:11

I have written a simple, working tetris game with each block as an instance of a class singleblock.

class SingleBlock
{
    public:
    SingleBlock(int, int)         


        
13条回答
  •  温柔的废话
    2020-11-21 06:58

    It won't zero/change memory just yet... but at some point, the rug is going to be pulled from under your feet.

    No it is certainly not predictable: it depends on how fast memory allocation/deallocation is churned.

提交回复
热议问题