samedi 11 juillet 2020

Delete objects created during object construction?

If objects are created during the construction of a class like this:

class MyClass
{
private:
  std::vector < MyObject*> MyObjects = { new MyObject };
...

Do I need to delete the objects in the vector during the destructor?

Aucun commentaire:

Enregistrer un commentaire