Article View: comp.std.c++
Article #746Re: Exception Specifications
From: Markku Sakkinen
Date: Mon, 05 Oct 1992 07:35
Date: Mon, 05 Oct 1992 07:35
25 lines
1590 bytes
1590 bytes
In article <23785@alice.att.com> ark@alice.UUCP () writes:
>In article <1992Oct2.125244.14614@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen) writes:
>
>> The handler has no way to know when it has to delete the exception object,
>> short of there being a quasi-Boolean field 'delete_me' in Exception.
>> ...
>
>These problems do not occur if you throw objects (rather than pointers)
>and catch references. In that case, the implementation takes care of
>deleting things at the proper time.
That is impossible! If the exception argument has been allocated by 'new',
the implementation cannot guess whether it should be deleted or not.
It may well be an object used by an outer block or function,
and which has not as its _only_ purpose to convey exception information.
----------------------------------------------------------------------
Markku Sakkinen (sakkinen@jytko.jyu.fi)
SAKKINEN@FINJYU.bitnet (alternative network address)
Department of Computer Science and Information Systems
University of Jyvaskyla (a's with umlauts)
PL 35
SF-40351 Jyvaskyla (umlauts again)
Finland
----------------------------------------------------------------------
Technical Details
Message-ID:
<1992Oct5.073509.1188@jyu.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinenReferences:
<9227620.2176@mulga.cs.mu.OZ.AU> <1992Oct2.125244.14614@jyu.fi> <23785@alice.att.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen From: sakkinen@jyu.fi (Markku Sakkinen) Subject: Re: Exception Specifications Message-ID: <1992Oct5.073509.1188@jyu.fi> Organization: University of Jyvaskyla, Finland References: <9227620.2176@mulga.cs.mu.OZ.AU> <1992Oct2.125244.14614@jyu.fi> <23785@alice.att.com> Date: Mon, 5 Oct 1992 07:35:09 GMT Lines: 25