Click here to Skip to main content
15,032,024 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to create progress dialog box? Pin
nbugalia19-Sep-07 22:56
Membernbugalia19-Sep-07 22:56 
GeneralRe: How to create progress dialog box? Pin
Cedric Moonen19-Sep-07 23:04
MemberCedric Moonen19-Sep-07 23:04 
GeneralRe: How to create progress dialog box? Pin
nbugalia19-Sep-07 23:13
Membernbugalia19-Sep-07 23:13 
AnswerRe: How to create progress dialog box? Pin
David Crow20-Sep-07 2:56
MemberDavid Crow20-Sep-07 2:56 
Questionhow to get the value of a check box in a dialog box Pin
Dhiraj kumar Saini19-Sep-07 20:29
MemberDhiraj kumar Saini19-Sep-07 20:29 
AnswerRe: how to get the value of a check box in a dialog box Pin
Maxwell Chen19-Sep-07 20:32
MemberMaxwell Chen19-Sep-07 20:32 
AnswerRe: how to get the value of a check box in a dialog box Pin
David Crow20-Sep-07 2:54
MemberDavid Crow20-Sep-07 2:54 
QuestionMemory Leak problem Pin
GauranG Shah19-Sep-07 20:07
MemberGauranG Shah19-Sep-07 20:07 
Hello Friends,

I am facing the problem of memory leak. In one of the application I am taking dynamic global object. And when I try to delete then in my WinMain() function before return 0; statement but it gives me assertion errror.

I am using somewhat like this;
<br />
myclass *obj = new myclass();<br />
<br />
INT WINAPI WinMain( ....)<br />
{<br />
   delete obj; //getting error here.<br />
  return 0;<br />
<br />
}

the error is like this:
Debug assertion failed.
expression _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) is invalid.


So I am using somewhat like this

INT WINAPI WinMain( ....)<br />
{<br />
   delete (void *)obj; //Now no error;<br />
  return 0;<br />
<br />
}

Now my question is.
Now will there be any memory leak in the programme or not ???
GeneralRe: Memory Leak problem Pin
Maxwell Chen19-Sep-07 20:30
MemberMaxwell Chen19-Sep-07 20:30 
AnswerRe: Memory Leak problem Pin
ThatsAlok19-Sep-07 20:33
MemberThatsAlok19-Sep-07 20:33 
GeneralRe: Memory Leak problem Pin
Cedric Moonen19-Sep-07 20:43
MemberCedric Moonen19-Sep-07 20:43 
AnswerRe: Memory Leak problem Pin
Cedric Moonen19-Sep-07 20:42
MemberCedric Moonen19-Sep-07 20:42 
AnswerRe: Memory Leak problem Pin
Emilio Garavaglia19-Sep-07 20:42
MemberEmilio Garavaglia19-Sep-07 20:42 
AnswerRe: Memory Leak problem Pin
nbugalia19-Sep-07 20:57
Membernbugalia19-Sep-07 20:57 
AnswerOff Topic Pin
toxcct19-Sep-07 22:08
Membertoxcct19-Sep-07 22:08 
GeneralRe: Off Topic Pin
GauranG Shah19-Sep-07 23:11
MemberGauranG Shah19-Sep-07 23:11 
GeneralRe: Off Topic Pin
toxcct19-Sep-07 23:24
Membertoxcct19-Sep-07 23:24 
GeneralRe: Off Topic Pin
GauranG Shah20-Sep-07 1:57
MemberGauranG Shah20-Sep-07 1:57 
GeneralRe: Off Topic Pin
toxcct20-Sep-07 1:58
Membertoxcct20-Sep-07 1:58 
GeneralRe: Off Topic Pin
David Crow20-Sep-07 2:51
MemberDavid Crow20-Sep-07 2:51 
GeneralRe: Off Topic Pin
toxcct20-Sep-07 2:54
Membertoxcct20-Sep-07 2:54 
QuestionPlease help regarding the following error Pin
hits0719-Sep-07 18:57
Memberhits0719-Sep-07 18:57 
AnswerRe: Please help regarding the following error Pin
nbugalia19-Sep-07 19:27
Membernbugalia19-Sep-07 19:27 
GeneralRe: Please help regarding the following error Pin
hits0719-Sep-07 19:41
Memberhits0719-Sep-07 19:41 
GeneralRe: Please help regarding the following error Pin
nbugalia19-Sep-07 20:06
Membernbugalia19-Sep-07 20:06 

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.