Here's a question regarding destroying objects and thus freeing up
memory as it should (I've read many articles about this subject but
most of them are saying different things about the same issue). Let's
say that I have a following class:

class CMyDialog::publicCDialog{
public:
CMyDialog(CWnd* pParent = NULL); //constructor
enum{IDD=IDDDIALOG}
CBitmapButton bButton;
protected:
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
int a, b;
CString s;
};

So, the question is: when I create this object in my code and then
destroy it afterwards with EndDialog(IDOK), and DeleteTempMap following
immediately, will the destructor destroy and free memory that was
occupied with those various variables that I've declared some of them
as public some as protected? Especially I'm curious about CString s
variable? Please advise my how you people do it if they aren't
destroyed auttomaticaly? Thanks for replying.