Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to create progress dialog box? Pin
nbugalia19-Sep-07 22:56
nbugalia19-Sep-07 22:56 
GeneralRe: How to create progress dialog box? Pin
Cedric Moonen19-Sep-07 23:04
Cedric Moonen19-Sep-07 23:04 
GeneralRe: How to create progress dialog box? Pin
nbugalia19-Sep-07 23:13
nbugalia19-Sep-07 23:13 
AnswerRe: How to create progress dialog box? Pin
David Crow20-Sep-07 2:56
David 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
Dhiraj 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
Maxwell 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
David Crow20-Sep-07 2:54 
QuestionMemory Leak problem Pin
GauranG Shah19-Sep-07 20:07
GauranG 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
Maxwell Chen19-Sep-07 20:30 
AnswerRe: Memory Leak problem Pin
ThatsAlok19-Sep-07 20:33
ThatsAlok19-Sep-07 20:33 
GeneralRe: Memory Leak problem Pin
Cedric Moonen19-Sep-07 20:43
Cedric Moonen19-Sep-07 20:43 
AnswerRe: Memory Leak problem Pin
Cedric Moonen19-Sep-07 20:42
Cedric Moonen19-Sep-07 20:42 
AnswerRe: Memory Leak problem Pin
Emilio Garavaglia19-Sep-07 20:42
Emilio Garavaglia19-Sep-07 20:42 
AnswerRe: Memory Leak problem Pin
nbugalia19-Sep-07 20:57
nbugalia19-Sep-07 20:57 
AnswerOff Topic Pin
toxcct19-Sep-07 22:08
toxcct19-Sep-07 22:08 
GeneralRe: Off Topic Pin
GauranG Shah19-Sep-07 23:11
GauranG Shah19-Sep-07 23:11 
GeneralRe: Off Topic Pin
toxcct19-Sep-07 23:24
toxcct19-Sep-07 23:24 
GeneralRe: Off Topic Pin
GauranG Shah20-Sep-07 1:57
GauranG Shah20-Sep-07 1:57 
GeneralRe: Off Topic Pin
toxcct20-Sep-07 1:58
toxcct20-Sep-07 1:58 
GeneralRe: Off Topic Pin
David Crow20-Sep-07 2:51
David Crow20-Sep-07 2:51 
GeneralRe: Off Topic Pin
toxcct20-Sep-07 2:54
toxcct20-Sep-07 2:54 
QuestionPlease help regarding the following error Pin
hits0719-Sep-07 18:57
hits0719-Sep-07 18:57 
AnswerRe: Please help regarding the following error Pin
nbugalia19-Sep-07 19:27
nbugalia19-Sep-07 19:27 
GeneralRe: Please help regarding the following error Pin
hits0719-Sep-07 19:41
hits0719-Sep-07 19:41 
GeneralRe: Please help regarding the following error Pin
nbugalia19-Sep-07 20:06
nbugalia19-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.