🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #748

Re: Exception Specifications

#748
From: Markku Sakkinen
Date: Mon, 05 Oct 1992 12:58
27 lines
1822 bytes
In article <1992Oct5.073509.1188@jyu.fi> sakkinen@jyu.fi (myself) writes:
>In article <23785@alice.att.com> ark@alice.UUCP () writes:
>>In article <1992Oct2.125244.14614@jyu.fi> sakkinen@jyu.fi (Markku Sakkinen) writes:
>>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.

Well, now I see that you must have had a tacit assumption:
that to 'throw objects' means to throw variables (objects)
that are _not_ allocated dynamically (from the heap).
Then you are correct, of course.  Proper deallocation is in
general a very tough problem for C++ programmers only with dynamic objects.

----------------------------------------------------------------------
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.125819.18425@jyu.fi>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
References: <1992Oct2.125244.14614@jyu.fi> <23785@alice.att.com> <1992Oct5.073509.1188@jyu.fi>

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.125819.18425@jyu.fi>
Organization: University of Jyvaskyla, Finland
References: <1992Oct2.125244.14614@jyu.fi> <23785@alice.att.com> <1992Oct5.073509.1188@jyu.fi>
Date: Mon, 5 Oct 1992 12:58:19 GMT
Lines: 27