Click here to Skip to main content
15,901,666 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTile Windows Horizontally and Tile Windows Vertically Pin
Ali Niaz14-Oct-04 5:54
Ali Niaz14-Oct-04 5:54 
GeneralRe: Tile Windows Horizontally and Tile Windows Vertically Pin
BlackDice14-Oct-04 6:35
BlackDice14-Oct-04 6:35 
GeneralRe: Tile Windows Horizontally and Tile Windows Vertically Pin
David Crow14-Oct-04 6:45
David Crow14-Oct-04 6:45 
QuestionException object destroyed 3 times? Pin
Bob Stanneveld14-Oct-04 5:36
Bob Stanneveld14-Oct-04 5:36 
AnswerRe: Exception object destroyed 3 times? Pin
John M. Drescher14-Oct-04 6:25
John M. Drescher14-Oct-04 6:25 
GeneralRe: Exception object destroyed 3 times? Pin
Bob Stanneveld14-Oct-04 6:31
Bob Stanneveld14-Oct-04 6:31 
GeneralErrors C2371 and C2512. Pin
Cleber Marinho14-Oct-04 4:49
sussCleber Marinho14-Oct-04 4:49 
QuestionCleanup of exception objects? Pin
Bob Stanneveld14-Oct-04 3:44
Bob Stanneveld14-Oct-04 3:44 
Hello,

I, once again, am wondering about some C++ thing. This time it is about the cleanup of thrown exceptions.

Consider the following code:
<br />
// in some function an error condition is met<br />
throw new CSomeException(ErrorNumber);<br />
<br />
// in a try-catch block the exception is caught like this<br />
catch(CSomeException *pEx)<br />
{<br />
  // handle exception, don't call delete on pEx!<br />
}<br />


I want to know if the destructor is called when the catch-block is left, or does this lead to a memory leak?


Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.

AnswerRe: Cleanup of exception objects? Pin
Nathan Holt at EMOM14-Oct-04 5:06
Nathan Holt at EMOM14-Oct-04 5:06 
GeneralRe: Cleanup of exception objects? Pin
Bob Stanneveld14-Oct-04 5:16
Bob Stanneveld14-Oct-04 5:16 
AnswerRe: Cleanup of exception objects? Pin
Cleber Marinho14-Oct-04 5:11
sussCleber Marinho14-Oct-04 5:11 
GeneralRe: Cleanup of exception objects? Pin
Bob Stanneveld14-Oct-04 5:21
Bob Stanneveld14-Oct-04 5:21 
Generalchar array -&gt; system::string Pin
Darcy P14-Oct-04 2:57
Darcy P14-Oct-04 2:57 
GeneralCString problem Pin
Anonymous14-Oct-04 2:33
Anonymous14-Oct-04 2:33 
GeneralRe: CString problem Pin
David Crow14-Oct-04 2:42
David Crow14-Oct-04 2:42 
GeneralRe: CString problem Pin
BlackDice14-Oct-04 3:01
BlackDice14-Oct-04 3:01 
GeneralRe: CString problem Pin
Bob Stanneveld14-Oct-04 3:33
Bob Stanneveld14-Oct-04 3:33 
GeneralRe: CString problem Pin
hyling14-Oct-04 4:17
hyling14-Oct-04 4:17 
GeneralLinking a C# dll into C++ Pin
Member 131514814-Oct-04 2:21
Member 131514814-Oct-04 2:21 
GeneralDirectX CreateSurface question Pin
Cedric Moonen14-Oct-04 2:03
Cedric Moonen14-Oct-04 2:03 
GeneralRe: DirectX CreateSurface question Pin
BlackDice14-Oct-04 3:03
BlackDice14-Oct-04 3:03 
GeneralRe: DirectX CreateSurface question Pin
Cedric Moonen14-Oct-04 3:11
Cedric Moonen14-Oct-04 3:11 
GeneralRe: DirectX CreateSurface question Pin
Antony M Kancidrowski14-Oct-04 4:12
Antony M Kancidrowski14-Oct-04 4:12 
GeneralRe: DirectX CreateSurface question Pin
Cedric Moonen14-Oct-04 4:31
Cedric Moonen14-Oct-04 4:31 
GeneralRe: DirectX CreateSurface question Pin
Antony M Kancidrowski14-Oct-04 4:57
Antony M Kancidrowski14-Oct-04 4:57 

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.