Click here to Skip to main content
16,004,924 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Identify the CD rom drive Pin
Alex Orovetskiy9-Dec-05 10:49
Alex Orovetskiy9-Dec-05 10:49 
AnswerRe: Identify the CD rom drive Pin
Axter9-Dec-05 11:49
professionalAxter9-Dec-05 11:49 
GeneralRe: Identify the CD rom drive Pin
Alex Orovetskiy9-Dec-05 22:29
Alex Orovetskiy9-Dec-05 22:29 
AnswerRe: Identify the CD rom drive Pin
NYTSX11-Dec-05 9:54
NYTSX11-Dec-05 9:54 
GeneralRe: Identify the CD rom drive Pin
ThatsAlok11-Dec-05 21:27
ThatsAlok11-Dec-05 21:27 
Questionnew and delete operators size element Pin
lastgen9-Dec-05 9:53
lastgen9-Dec-05 9:53 
AnswerRe: new and delete operators size element Pin
Chris Losinger9-Dec-05 10:16
professionalChris Losinger9-Dec-05 10:16 
GeneralRe: new and delete operators size element Pin
lastgen9-Dec-05 10:31
lastgen9-Dec-05 10:31 
I'm debugging code that was written by someone else. I'm fairly new to c++ but have been coding in other high level languages for years. I'm getting heap corruption but it's not occurring in previous version, but it seems to occur after leaving the scope of a function I call from the old code. One of the big changes is that 'objectx ' is now 4 times larger than it had previously been, although it had always been much larger than bool. I guessing that perhaps the call to 'delete[] myobject' would create code saying 'deallocate heap at myobject with a size of 20 * sizeof(myobject)' instead of the intended 'deallocate heap at myobject with a size of 20 * sizeof(bool)' and that was always causing heap corruption.
This why the old version never completely worked, but it didn't cause many critical crashes. Now with the much larger object (an array of ~1000 in size of objects roughly 1k each!) its corrupting so much of the heap it killing the app. Is this likely to be correct?

-- modified at 16:44 Friday 9th December, 2005
GeneralRe: new and delete operators size element Pin
Tim Smith11-Dec-05 6:44
Tim Smith11-Dec-05 6:44 
AnswerRe: new and delete operators size element Pin
sun_shb9-Dec-05 20:43
sun_shb9-Dec-05 20:43 
GeneralRe: new and delete operators size element Pin
lastgen16-Dec-05 17:33
lastgen16-Dec-05 17:33 
Question[Message Deleted] Pin
Gunn3179-Dec-05 8:51
Gunn3179-Dec-05 8:51 
AnswerRe: Obtaining properties of an executable Pin
Chris Losinger9-Dec-05 8:54
professionalChris Losinger9-Dec-05 8:54 
GeneralRe: Obtaining properties of an executable Pin
Gunn31712-Dec-05 11:17
Gunn31712-Dec-05 11:17 
GeneralRe: Obtaining properties of an executable Pin
Gunn31713-Dec-05 4:44
Gunn31713-Dec-05 4:44 
Questionhow can i tell Pin
Umair Ahmad khan9-Dec-05 7:31
Umair Ahmad khan9-Dec-05 7:31 
AnswerRe: how can i tell Pin
Dominik Reichl9-Dec-05 10:45
Dominik Reichl9-Dec-05 10:45 
QuestionREG_QWORD max length??? Pin
Supriya Tonape9-Dec-05 7:24
Supriya Tonape9-Dec-05 7:24 
AnswerRe: REG_QWORD max length??? Pin
Jörgen Sigvardsson9-Dec-05 9:29
Jörgen Sigvardsson9-Dec-05 9:29 
QuestionChange class name Pin
skinnyreptile1689-Dec-05 6:34
skinnyreptile1689-Dec-05 6:34 
AnswerRe: Change class name Pin
Chris Losinger9-Dec-05 7:12
professionalChris Losinger9-Dec-05 7:12 
GeneralRe: Change class name Pin
skinnyreptile1689-Dec-05 8:35
skinnyreptile1689-Dec-05 8:35 
GeneralRe: Change class name Pin
Chris Losinger9-Dec-05 8:53
professionalChris Losinger9-Dec-05 8:53 
QuestionHow to draw edge with thick line Pin
AnTri9-Dec-05 4:07
AnTri9-Dec-05 4:07 
AnswerRe: How to draw edge with thick line Pin
Iain Clarke, Warrior Programmer9-Dec-05 4:37
Iain Clarke, Warrior Programmer9-Dec-05 4:37 

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.