Click here to Skip to main content
15,921,548 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAll this using C++ Builder 6 Pin
msbcomp14-Apr-06 18:59
msbcomp14-Apr-06 18:59 
AnswerRe: All this using C++ Builder 6 Pin
Maxwell Chen15-Apr-06 6:07
Maxwell Chen15-Apr-06 6:07 
QuestionTextbox Pin
Scientest14-Apr-06 18:19
Scientest14-Apr-06 18:19 
AnswerRe: Textbox Pin
Ganesh_T14-Apr-06 18:32
Ganesh_T14-Apr-06 18:32 
AnswerRe: Textbox Pin
Saurabh.Garg14-Apr-06 18:38
Saurabh.Garg14-Apr-06 18:38 
AnswerRe: Textbox Pin
Aqueel14-Apr-06 20:11
Aqueel14-Apr-06 20:11 
AnswerRe: Textbox Pin
Hamid_RT14-Apr-06 20:18
Hamid_RT14-Apr-06 20:18 
QuestionWhy does delete cause Debug Assertion ? Pin
EthannCastell14-Apr-06 18:10
EthannCastell14-Apr-06 18:10 
Hi,

I have a problem using the delete operator on an object. I have been debugging the code for hours and have run out of ideas. My code is similar to the following:

MyClass *MyClassPointer;
MyClassPointer = new MyClass(PointerParam1, PointerParam2);
delete MyClassPointer;

The code "delete MyClassPointer" cause a Debug Assertion saying that line 1044 of dbgheap.c caused an error at the expression _CrtIsValidHeapPointer(pUserData).

I'm completely stumped as to why I can't delete this particular object. I am dynamically allocating and deleting lots of other objects without any problem but this one is causing me grief.

Any ideas as to what I should be looking for ?

Thanks
Ethann Castell
AnswerRe: Why does delete cause Debug Assertion ? Pin
Saurabh.Garg14-Apr-06 18:32
Saurabh.Garg14-Apr-06 18:32 
AnswerRe: Why does delete cause Debug Assertion ? Pin
Michael Dunn14-Apr-06 20:34
sitebuilderMichael Dunn14-Apr-06 20:34 
GeneralProblem was caused by trying to delete Pin
EthannCastell14-Apr-06 21:31
EthannCastell14-Apr-06 21:31 
Questionhelp with my video card Pin
includeh1014-Apr-06 16:26
includeh1014-Apr-06 16:26 
AnswerRe: help with my video card Pin
El Corazon14-Apr-06 16:46
El Corazon14-Apr-06 16:46 
QuestionCompilation problems in visual studio, or is it really a syntax error? Pin
kuroiryu14-Apr-06 14:35
kuroiryu14-Apr-06 14:35 
AnswerRe: Compilation problems in visual studio, or is it really a syntax error? Pin
georgeraafat14-Apr-06 14:44
georgeraafat14-Apr-06 14:44 
AnswerRe: Compilation problems in visual studio, or is it really a syntax error? Pin
Saurabh.Garg14-Apr-06 15:16
Saurabh.Garg14-Apr-06 15:16 
GeneralRe: Compilation problems in visual studio, or is it really a syntax error? Pin
kuroiryu14-Apr-06 15:24
kuroiryu14-Apr-06 15:24 
GeneralYEAH i found the answer, thanks for your replies Pin
kuroiryu14-Apr-06 16:21
kuroiryu14-Apr-06 16:21 
GeneralRe: Compilation problems in visual studio, or is it really a syntax error? Pin
Saurabh.Garg14-Apr-06 17:41
Saurabh.Garg14-Apr-06 17:41 
QuestionConstructor problem Pin
hint_5414-Apr-06 14:22
hint_5414-Apr-06 14:22 
AnswerRe: Constructor problem Pin
georgeraafat14-Apr-06 14:41
georgeraafat14-Apr-06 14:41 
GeneralRe: Constructor problem Pin
hint_5414-Apr-06 14:45
hint_5414-Apr-06 14:45 
GeneralRe: Constructor problem Pin
georgeraafat14-Apr-06 15:08
georgeraafat14-Apr-06 15:08 
GeneralRe: Constructor problem Pin
hint_5414-Apr-06 16:00
hint_5414-Apr-06 16:00 
AnswerRe: Constructor problem Pin
Saurabh.Garg14-Apr-06 15:11
Saurabh.Garg14-Apr-06 15:11 

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.