c++ destructors
===

consider this scenario:
I need to create a ui for some settings. As, data and ui should be separated in theory, I defined a separate class which takes care of the configuration data. The question I have is how to instantiate the data class inside the settings class. 
One way is to create the data class in the caller object, I mean the object that calls the settings menu class. The other way, which my question is involved with, is to create a DATA class variable inside the settings class. m doubt what happens when the settings class gets destroyed then! would the data class object inside settings class also get destoryed? what about if it is defined as a static member of settings class?