Click here to Skip to main content
15,901,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Corruption of the heap. Why ? Pin
Rolf Kristensen8-Jun-12 2:01
Rolf Kristensen8-Jun-12 2:01 
GeneralRe: Corruption of the heap. Why ? Pin
Erudite_Eric8-Jun-12 2:35
Erudite_Eric8-Jun-12 2:35 
GeneralRe: Corruption of the heap. Why ? Pin
sdancer758-Jun-12 6:02
sdancer758-Jun-12 6:02 
AnswerRe: Corruption of the heap. Why ? Pin
Aescleal8-Jun-12 3:00
Aescleal8-Jun-12 3:00 
GeneralRe: Corruption of the heap. Why ? Pin
sdancer758-Jun-12 6:03
sdancer758-Jun-12 6:03 
GeneralRe: Corruption of the heap. Why ? Pin
sdancer759-Jun-12 3:43
sdancer759-Jun-12 3:43 
GeneralRe: Corruption of the heap. Why ? Pin
Aescleal9-Jun-12 9:51
Aescleal9-Jun-12 9:51 
GeneralRe: Corruption of the heap. Why ? Pin
sdancer759-Jun-12 23:58
sdancer759-Jun-12 23:58 
Thank you Aescleal,

Yes the CCatalogView is created on the stack and I did know that from the beggining, but I was wondering about the time are happenning all these things.

1. I create on the stack the  CCatalogView

2. Inside the CCatalogView class I create a Win32 Window (using Create). Really, does this window is created on the heap or in the stack ? I assume that is created on the stack. Anyway, I tried to explicitly create this window on the heap, using new (on the CreatePane) & delete (on the destructor) functions  but it also fails.

3. Now, according to my assumptions that both objects are in the stack, at the exiting procedure, it disposes first the last inserted item which is the Win32 Window (as I mentioned, I assume it created on the stack) and then the CCatalogView class itleft.


What's of the above assumptions are wrong ? That is what I did not understand.

Regards,
George

PS: Reading your comment again, you assume that the MFC Framework when is trying to delete the Window itself, is deleting also the class that is associated with that window. Maybe, is something that I did not understand well. Can you please clarify that ?
sdancer75

GeneralRe: Corruption of the heap. Why ? Pin
sdancer7512-Jun-12 3:18
sdancer7512-Jun-12 3:18 
QuestionException when debugging Multithread Pin
ForNow7-Jun-12 19:04
ForNow7-Jun-12 19:04 
AnswerRe: Exception when debugging Multithread Pin
«_Superman_»7-Jun-12 19:15
professional«_Superman_»7-Jun-12 19:15 
GeneralRe: Exception when debugging Multithread Pin
ForNow7-Jun-12 23:53
ForNow7-Jun-12 23:53 
GeneralRe: Exception when debugging Multithread Pin
ForNow7-Jun-12 23:58
ForNow7-Jun-12 23:58 
AnswerRe: Exception when debugging Multithread Pin
Erudite_Eric7-Jun-12 20:34
Erudite_Eric7-Jun-12 20:34 
AnswerRe: Exception when debugging Multithread Pin
Richard MacCutchan7-Jun-12 21:53
mveRichard MacCutchan7-Jun-12 21:53 
GeneralRe: Exception when debugging Multithread Pin
Erudite_Eric7-Jun-12 23:35
Erudite_Eric7-Jun-12 23:35 
GeneralRe: Exception when debugging Multithread Pin
Richard MacCutchan8-Jun-12 0:19
mveRichard MacCutchan8-Jun-12 0:19 
QuestionCalculate checksum using ASLR Pin
Giggsey737-Jun-12 8:39
Giggsey737-Jun-12 8:39 
QuestionRe: Calculate checksum using ASLR Pin
David Crow7-Jun-12 8:43
David Crow7-Jun-12 8:43 
AnswerRe: Calculate checksum using ASLR Pin
Giggsey737-Jun-12 8:46
Giggsey737-Jun-12 8:46 
AnswerRe: Calculate checksum using ASLR Pin
David Crow7-Jun-12 8:55
David Crow7-Jun-12 8:55 
GeneralRe: Calculate checksum using ASLR Pin
Giggsey737-Jun-12 9:08
Giggsey737-Jun-12 9:08 
GeneralRe: Calculate checksum using ASLR Pin
Giggsey738-Jun-12 8:34
Giggsey738-Jun-12 8:34 
GeneralRe: Calculate checksum using ASLR Pin
Randor 8-Jun-12 9:48
professional Randor 8-Jun-12 9:48 
GeneralRe: Calculate checksum using ASLR Pin
Giggsey738-Jun-12 18:48
Giggsey738-Jun-12 18:48 

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.