What are the differences between MFC Exception macros and
C++ exception keywords?
Answers were Sorted based on User's Feedback
Answer / hemalatha
The main difference between the macros and the keywords is
that the macros "automatically" delete a caught exception
when the exception goes out of scope. Code using the
keywords does not; exceptions caught in a catch block must
be explicitly deleted. Mixing macros and C++ exception
keywords can cause memory leaks when an exception object is
not deleted, or heap corruption when an exception is
deleted twice.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / mullaikani
Class macros — TRY, CATCH, THROW, and so on — to use the C++
exception-handling keywords try, catch, and throw.
The major difference between the macros and the keywords is
that code using the macros "automatically" deletes a caught
exception when the exception goes out of scope. Code using
the keywords does not, so you must explicitly delete a
caught exception.
| Is This Answer Correct ? | 2 Yes | 1 No |
What is the use of CCmdTarget ?
What is the difference between the ASSERT and VERIFY macros?
19)how to set Back Ground Picture to a Dialog Box in MFC ?
what is the use of CWinApp class?
What is the difference between Extension DLL and Regular DLL?
How you find memory leaks?
What is the range of intensity of RGB
what is the difference between SDI and MDI
15 Answers CMC, HCL, Siemens,
What is difference between the TCP/IP and UDP socket
What are the special requirements for dialog box resources used in a form view?
What is socket?
How to handle command line arguements from simple MFC application ?