say I have class Foo which I allocate on the heap via the 'new' keyword. Say Foo has non-pointer data member Bar. Bar, although non-pointer, is itself on the heap since it is a part of Foo. It will be properly deallocated when I delete my Foo object - even if I declare my own Foo destructor that doesn't (wont, and shouldn't) delete Bar.
Is there some term for data members like Bar which, although on the heap, isn't created via the "new" keyword? For objects not stack allocated but destructor-calling handled automagically.
Is Foo's default destructor still created even though the programmer has declared and defined one, that executes afterward?
If not, how does Bar's destructor get called?
Given the standards rule that says "the committee shall make no rule that prevents C++ programmers from shooting themselves in the foot," if I WANTED to create a memory leak on a non-pointer data member, whether stack or heap allocated, how would I do so? (Note: I'm not actually trying to do this)