| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"George2" |
| Date: |
28 Jan 2008 12:01:47 AM |
| Object: |
Uncaught exception |
Hello everyone,
Just want to check whether my understanding is correct,
Both (1) and (2) only covers Windows C++ platform.
1. If there is uncaught exception, destructor is not ensured to be
called for active object;
2. All the resources (handles, memory, etc.) for current process will
be released when uncaught exception causing process to terminate.
thanks in advance,
George
.
|
|
| User: "Christopher Pisz" |
|
| Title: Re: Uncaught exception |
28 Jan 2008 01:05:15 AM |
|
|
"George2" <george4academic@yahoo.com> wrote in message
news:c0f8929a-b78d-4ec1-b1d7-41efd842bfed@e6g2000prf.googlegroups.com...
Hello everyone,
Just want to check whether my understanding is correct,
Both (1) and (2) only covers Windows C++ platform.
1. If there is uncaught exception, destructor is not ensured to be
called for active object;
What's an "active" object?
2. All the resources (handles, memory, etc.) for current process will
be released when uncaught exception causing process to terminate.
Best asked in one of the microsoft.public newsgroups. Or better yet, looked
up on MSDN.
.
|
|
|
|
| User: "Ian Collins" |
|
| Title: Re: Uncaught exception |
28 Jan 2008 12:57:02 AM |
|
|
George2 wrote:
Hello everyone,
Just want to check whether my understanding is correct,
Both (1) and (2) only covers Windows C++ platform.
Then why ask here?
--
Ian Collins.
.
|
|
|
|
| User: "bjeremy" |
|
| Title: Re: Uncaught exception |
28 Jan 2008 10:32:47 AM |
|
|
On Jan 28, 12:01 am, George2 <george4acade...@yahoo.com> wrote:
Hello everyone,
Just want to check whether my understanding is correct,
Both (1) and (2) only covers Windows C++ platform.
1. If there is uncaught exception, destructor is not ensured to be
called for active object;
On any caught or uncaught exception, destructors for objects aren't
guaranteed to be called.
2. All the resources (handles, memory, etc.) for current process will
be released when uncaught exception causing process to terminate.
On any caught or uncaught exceptions all Resources aren't guaranteed
to be released.
thanks in advance,
George
Use RAII.
.
|
|
|
|

|
Related Articles |
|
|