deleting dynamically allocated object that contains vector in C++ STL

前端 未结 4 642
闹比i
闹比i 2021-01-23 22:12

I have a class

class ChartLine{

protected:
        vector line; // points connecting the line
        CString name; //line name for legend                 


        
4条回答
  •  灰色年华
    2021-01-23 22:33

    The only time you ever need to call delete is after you've called new. Everything else is handled.

提交回复
热议问题