This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Feature question


On Fri, 04 Oct 2002 15:06:41 -0400, "Michael Lovett" <mlovett@morpace.com> wrote:

> Well, sometimes there are things you want to do locally in your code that
> don't necessarily involve object destruction, and you'd like these things
> to happen whether or not an exception was thrown. These are the types of
> things we are anxious for try/finally.

No, they don't necessarily involve object destruction, but they can
certainly be written using a destructor, perhaps for a local class.
Usually they involve cleaning up after initialization code earlier in the
function, in which case writing them as a constructor/destructor pair makes
a lot of sense.

And it's portable C++, which try/finally isn't.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]