Click here to Skip to main content
15,938,682 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem with ReceiveFrom() function Pin
Mark Salsbery5-Aug-08 6:09
Mark Salsbery5-Aug-08 6:09 
QuestionCompiler Error Pin
john56324-Aug-08 20:35
john56324-Aug-08 20:35 
AnswerRe: Compiler Error Pin
T.RATHA KRISHNAN4-Aug-08 23:01
T.RATHA KRISHNAN4-Aug-08 23:01 
AnswerRe: Compiler Error Pin
Mark Salsbery5-Aug-08 6:23
Mark Salsbery5-Aug-08 6:23 
QuestionHow to get camera properties? Pin
Shivarudrayya H4-Aug-08 20:30
Shivarudrayya H4-Aug-08 20:30 
AnswerRe: How to get camera properties? Pin
Mark Salsbery5-Aug-08 6:26
Mark Salsbery5-Aug-08 6:26 
Questiontry-catch dynamic memory cleanup Pin
x87Bliss4-Aug-08 20:21
x87Bliss4-Aug-08 20:21 
AnswerRe: try-catch dynamic memory cleanup Pin
pallaka4-Aug-08 20:39
pallaka4-Aug-08 20:39 
You have allocated memory in a heap by using new.
And after that you are executing the next statement which is failing.
As i Know you should delete the memory which is created dynamically.
So in catch statement the deletion part is must.

But if


failfunc(); // would normally actually do something
       char *mystr = new char[512]; // something in the try block determines the size needed, so must
                                       be allocated in the try block
       Statement 1.....
       delete [] mystr;

then as function failed it will not try to execute the next statment so there it will skip the creation of memory .so you need not to delete ....
AnswerRe: try-catch dynamic memory cleanup Pin
Cedric Moonen4-Aug-08 20:39
Cedric Moonen4-Aug-08 20:39 
AnswerRe: try-catch dynamic memory cleanup Pin
not_in_use5-Aug-08 8:33
not_in_use5-Aug-08 8:33 
GeneralRe: try-catch dynamic memory cleanup Pin
x87Bliss5-Aug-08 11:25
x87Bliss5-Aug-08 11:25 
GeneralRe: try-catch dynamic memory cleanup Pin
not_in_use5-Aug-08 12:07
not_in_use5-Aug-08 12:07 
AnswerRe: try-catch dynamic memory cleanup Pin
Stephen Hewitt5-Aug-08 14:05
Stephen Hewitt5-Aug-08 14:05 
QuestionHow to install MyApp.exe from custom actions in setup and deployment type project in VS2005 Pin
kapardhi4-Aug-08 20:09
kapardhi4-Aug-08 20:09 
AnswerRe: How to install MyApp.exe from custom actions in setup and deployment type project in VS2005 Pin
_AnsHUMAN_ 4-Aug-08 20:26
_AnsHUMAN_ 4-Aug-08 20:26 
AnswerRe: How to install MyApp.exe from custom actions in setup and deployment type project in VS2005 Pin
KarstenK4-Aug-08 21:19
mveKarstenK4-Aug-08 21:19 
QuestionHow to set Debug Info option in vc++6.0 for command line build? Pin
Super Hornet4-Aug-08 19:48
Super Hornet4-Aug-08 19:48 
QuestionRe: How to set Debug Info option in vc++6.0 for command line build? Pin
Super Hornet4-Aug-08 21:25
Super Hornet4-Aug-08 21:25 
QuestionHow to change Regional Settings(API)? Pin
ritz12344-Aug-08 19:36
ritz12344-Aug-08 19:36 
Questioncreate data base in vc++6 Pin
ani_ikram4-Aug-08 18:27
ani_ikram4-Aug-08 18:27 
AnswerRe: create data base in vc++6 Pin
_AnsHUMAN_ 4-Aug-08 20:00
_AnsHUMAN_ 4-Aug-08 20:00 
GeneralRe: create data base in vc++6 Pin
ani_ikram4-Aug-08 20:56
ani_ikram4-Aug-08 20:56 
GeneralRe: create data base in vc++6 Pin
_AnsHUMAN_ 4-Aug-08 21:46
_AnsHUMAN_ 4-Aug-08 21:46 
QuestionAn exception occurred while trying to run "Shell32.dll,Control_RunDLL ConnectorCpl.cpl Pin
monsieur_jj4-Aug-08 17:23
monsieur_jj4-Aug-08 17:23 
QuestionLINK : fatal error LNK1104: Pin
ani_ikram4-Aug-08 17:23
ani_ikram4-Aug-08 17:23 

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.