[quote author="RickH" date="1313418131"]
The way C++ is set up, the destructor for the object-as-a-whole is called before the destructors for the objects-who-are-members. So I have to not set the parent of the member to be the object-as-a-whole. If I do, the object-as-a-whole will call delete on the member.
[/quote]
Yes, that's correct.
And the destructor fthe object-as-a-whole will be ran before the destructors of the members.
If you need parent-child relationship in this use case, use a pointer and new instead of an object variable.