michaelkrauklis
Programmer
I'm a little confused as to the memory management of MFC. eg:
//Say you make a pointer declaration as so
char *temp_str = "temp string";
//Then you wrap a CString around it
CString *temp_cstring = new CString( temp_str );
//Then what happens when you deallocate the CString?
delete temp_cstring;
Does it deallocate the memory for temp_str as well as temp_cstring or only the memory allocated to the CString? MYenigmaSELF
myenigmaself@yahoo.com
//Say you make a pointer declaration as so
char *temp_str = "temp string";
//Then you wrap a CString around it
CString *temp_cstring = new CString( temp_str );
//Then what happens when you deallocate the CString?
delete temp_cstring;
Does it deallocate the memory for temp_str as well as temp_cstring or only the memory allocated to the CString? MYenigmaSELF
myenigmaself@yahoo.com