Re: is such exception handling approach good?
- From: "Alex Blekhman" <tkfx.REMOVE@xxxxxxxxx>
- Date: Fri, 28 Dec 2007 16:18:11 +0200
"George" wrote:
When an application is terminated as we discussed before, the
resources
should be released automatically. So, I think when the
application
terminates, the destructors of all existing objects should be
invoked?
No, of course not. OS knows nothing about classes and objects.
When process terminates, then system reclaims whatever process
acquired during its lifetime: allocated memory, GDI objects,
opened handles and some other resources. But what exactly resided
in this memory (C++ object or FORTRAN code or .NET whatnot) is
internal knowledge of the process. So, if a developer didn't write
proper clean-up code to revert internal objects to some valid
state, then they will be killed as is. System doesn't know and
doesn't care obout your objects.
Alex
.
- References:
- is such exception handling approach good?
- From: George
- Re: is such exception handling approach good?
- From: ajk
- Re: is such exception handling approach good?
- From: Larry Smith
- Re: is such exception handling approach good?
- From: ajk
- Re: is such exception handling approach good?
- From: Larry Smith
- Re: is such exception handling approach good?
- From: ajk
- Re: is such exception handling approach good?
- From: Larry Smith
- Re: is such exception handling approach good?
- From: ajk
- Re: is such exception handling approach good?
- From: Ben Voigt [C++ MVP]
- Re: is such exception handling approach good?
- From: George
- Re: is such exception handling approach good?
- From: Ben Voigt [C++ MVP]
- Re: is such exception handling approach good?
- From: George
- Re: is such exception handling approach good?
- From: Norbert Unterberg
- Re: is such exception handling approach good?
- From: Ben Voigt [C++ MVP]
- Re: is such exception handling approach good?
- From: George
- is such exception handling approach good?
- Prev by Date: Re: MSDN volatile sample
- Next by Date: Re: The 10 richest players in " Microsoft.Public.VC.Language ".
- Previous by thread: Re: is such exception handling approach good?
- Next by thread: Re: is such exception handling approach good?
- Index(es):
Relevant Pages
|