Click here to Skip to main content
15,918,108 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tons of Variable Declarations Pin
Herboren27-Sep-09 21:02
Herboren27-Sep-09 21:02 
QuestionRe: Tons of Variable Declarations Pin
CPallini27-Sep-09 21:14
mveCPallini27-Sep-09 21:14 
QuestionUsing font in CPaintDC VC6 [solved] Pin
Eka Candra27-Sep-09 20:33
Eka Candra27-Sep-09 20:33 
AnswerRe: Using font in CPaintDC VC6 Pin
«_Superman_»27-Sep-09 20:36
professional«_Superman_»27-Sep-09 20:36 
NewsRe: Using font in CPaintDC VC6 Pin
Eka Candra27-Sep-09 20:54
Eka Candra27-Sep-09 20:54 
GeneralRe: Using font in CPaintDC VC6 Pin
Iain Clarke, Warrior Programmer28-Sep-09 19:58
Iain Clarke, Warrior Programmer28-Sep-09 19:58 
Questionchange color and font push button VC6 Pin
Eka Candra27-Sep-09 20:23
Eka Candra27-Sep-09 20:23 
AnswerRe: change color and font push button VC6 Pin
«_Superman_»27-Sep-09 20:34
professional«_Superman_»27-Sep-09 20:34 
GeneralRe: change color and font push button VC6 Pin
Eka Candra27-Sep-09 20:48
Eka Candra27-Sep-09 20:48 
GeneralRe: change color and font push button VC6 Pin
«_Superman_»27-Sep-09 20:55
professional«_Superman_»27-Sep-09 20:55 
GeneralRe: change color and font push button VC6 Pin
Eka Candra27-Sep-09 21:14
Eka Candra27-Sep-09 21:14 
GeneralRe: change color and font push button VC6 Pin
«_Superman_»28-Sep-09 5:49
professional«_Superman_»28-Sep-09 5:49 
QuestionRe: change color and font push button VC6 Pin
David Crow28-Sep-09 3:34
David Crow28-Sep-09 3:34 
GeneralRe: change color and font push button VC6 Pin
kilt30-Sep-09 4:52
kilt30-Sep-09 4:52 
QuestionHow to create a dialog that acts like MDIChild window Pin
NAngelUK27-Sep-09 12:02
NAngelUK27-Sep-09 12:02 
AnswerRe: How to create a dialog that acts like MDIChild window Pin
«_Superman_»27-Sep-09 16:20
professional«_Superman_»27-Sep-09 16:20 
GeneralRe: How to create a dialog that acts like MDIChild window Pin
neil.kuo27-Sep-09 17:33
neil.kuo27-Sep-09 17:33 
GeneralDirectX 10 Pin
MrMcIntyre27-Sep-09 10:57
MrMcIntyre27-Sep-09 10:57 
GeneralRe: DirectX 10 Pin
Richard MacCutchan27-Sep-09 12:19
mveRichard MacCutchan27-Sep-09 12:19 
GeneralRe: DirectX 10 Pin
CPallini27-Sep-09 23:42
mveCPallini27-Sep-09 23:42 
GeneralRe: DirectX 10 Pin
MrMcIntyre28-Sep-09 0:11
MrMcIntyre28-Sep-09 0:11 
GeneralRe: DirectX 10 Pin
CPallini28-Sep-09 0:52
mveCPallini28-Sep-09 0:52 
GeneralRe: DirectX 10 Pin
MrMcIntyre28-Sep-09 1:07
MrMcIntyre28-Sep-09 1:07 
GeneralRe: DirectX 10 Pin
CPallini28-Sep-09 1:51
mveCPallini28-Sep-09 1:51 
QuestionDestructors with inherited classes -- "Destructors 101"? Pin
Xpnctoc27-Sep-09 9:26
Xpnctoc27-Sep-09 9:26 
Suppose I have a parent class CParent. Suppose I have two other classes, CChildA and CChildB, which both inherit from CParent. Suppose I need to load two instances in memory, but other application conditions affect whether I'm working with CChildA or CChildB. This is obviously do-able with polymorphism like this:

CParent *pChildX = 0, *pChildY = 0;

At some point later I can make the appropriate assignments according to my application conditions:

pChildX = new CChildA();
pChildY = new CChildB();

My question is, what happens when run this code:

delete pChildX;
delete pChildY;

Is the child object fully deleted? I think it would, but it I'm confusing myself by thinking somehow only the CParent component of the data would be deleted, and that there would be a memory leak since the "delete" was not called on explicit CChildA or CChildB variables.

Please someone tell me I'm overthinking this.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.