Click here to Skip to main content
16,017,488 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: code to search in a text file Pin
Hamid_RT3-Jun-07 7:33
Hamid_RT3-Jun-07 7:33 
QuestionHeap corruption. Pin
Polite Programmer3-Jun-07 1:26
Polite Programmer3-Jun-07 1:26 
AnswerRe: Heap corruption. Pin
Gary R. Wheeler3-Jun-07 1:44
Gary R. Wheeler3-Jun-07 1:44 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 1:47
Polite Programmer3-Jun-07 1:47 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 1:57
Polite Programmer3-Jun-07 1:57 
GeneralRe: Heap corruption. Pin
Gary R. Wheeler3-Jun-07 1:59
Gary R. Wheeler3-Jun-07 1:59 
GeneralRe: Heap corruption. Pin
CPallini3-Jun-07 3:47
mveCPallini3-Jun-07 3:47 
AnswerRe: Heap corruption. Pin
Matthew Faithfull3-Jun-07 3:08
Matthew Faithfull3-Jun-07 3:08 
You'll get those heap corruption messages in Debug only because in debug the CRT ( C RunTime library ) is checking up on you and picking up the mismatch between malloc and delete. The Debug CRT new adds extra info to the allocation to indicate what sort of allocation it is, i.e. you did it or it's internal to the CRT or thread specific or whatever. When you do the delete, it checks this info to make sure it matches but because you called malloc the extra info didn't get initialised and it's either wrong or missing. In Release the extra info and checking is cut for performance so you don't get the errors.

Conclusion: For a happy life you really do need to match malloc with free and new with delete Wink | ;)

Nothing is exactly what it seems but everything with seems can be unpicked.

AnswerRe: Heap corruption. Pin
CPallini3-Jun-07 3:48
mveCPallini3-Jun-07 3:48 
AnswerRe: Heap corruption. Pin
Stephen Hewitt3-Jun-07 14:08
Stephen Hewitt3-Jun-07 14:08 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 20:00
Polite Programmer3-Jun-07 20:00 
GeneralRe: Heap corruption. Pin
Polite Programmer3-Jun-07 20:01
Polite Programmer3-Jun-07 20:01 
GeneralRe: Heap corruption. Pin
Stephen Hewitt3-Jun-07 20:05
Stephen Hewitt3-Jun-07 20:05 
Questionhelp with fstream Pin
anbluemoon3-Jun-07 1:24
anbluemoon3-Jun-07 1:24 
AnswerRe: help with fstream Pin
CPallini3-Jun-07 4:02
mveCPallini3-Jun-07 4:02 
QuestionDLL and EXE files Pin
prithaa3-Jun-07 0:43
prithaa3-Jun-07 0:43 
AnswerRe: DLL and EXE files Pin
Christian Graus3-Jun-07 1:14
protectorChristian Graus3-Jun-07 1:14 
GeneralRe: DLL and EXE files Pin
Rajesh R Subramanian3-Jun-07 20:43
professionalRajesh R Subramanian3-Jun-07 20:43 
QuestionRe: DLL and EXE files Pin
Matthew Faithfull3-Jun-07 1:18
Matthew Faithfull3-Jun-07 1:18 
AnswerRe: DLL and EXE files Pin
prithaa3-Jun-07 1:42
prithaa3-Jun-07 1:42 
GeneralRe: DLL and EXE files Pin
Matthew Faithfull3-Jun-07 2:59
Matthew Faithfull3-Jun-07 2:59 
AnswerRe: DLL and EXE files Pin
Hamid_RT3-Jun-07 7:33
Hamid_RT3-Jun-07 7:33 
QuestionHow do I make a child dialog draw on a different HDC Pin
KellyR2-Jun-07 17:51
KellyR2-Jun-07 17:51 
AnswerRe: How do I make a child dialog draw on a different HDC Pin
Naveen3-Jun-07 16:17
Naveen3-Jun-07 16:17 
Questionagain for InterlockedIncrement() Pin
includeh102-Jun-07 16:52
includeh102-Jun-07 16:52 

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.