Why doesn't the C++ default destructor destroy my objects?

前端 未结 13 2061
刺人心
刺人心 2020-12-14 06:59

The C++ specification says the default destructor deletes all non-static members. Nevertheless, I can\'t manage to achieve that.

I have this:

class N         


        
相关标签:
13条回答
  • 2020-12-14 07:48

    M destructor should have 'delete n'.

    0 讨论(0)
提交回复
热议问题