I am still learning C++ and still not very proficient.
Say, I have a class like this?
class Parent
{
public:
// Destructor
~Parent() noexcept;
private:
struct Child
{
Child* other;
};
Child* firstCell;
Child* lastCell;
};
What is the proper, modern, and safe way to write a destructor?
Is it just delete Child::other
? or, delete Child->other
?