comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Mize <smize@imagin.net>
Subject: Re: More questions...
Date: 1999/03/09
Date: 1999-03-09T00:00:00+00:00	[thread overview]
Message-ID: <7c40uu$14lu@news3.newsguy.com> (raw)
In-Reply-To: 7bvb4j$lt0$1@remarQ.com

Michael Young <nobody@all.org> wrote:
> 2) Robert Dewar stated some time ago that finalize should be used
> sparingly because of performance concerns. ...
> Destructors in C++ are simply
> normal function calls. Are controlled types significantly different from
> other types to make this unrealistic?

Was he saying that Finalize should be used sparingly compared to
C++ destructors?

I would assume that he was saying it should not be used unless needed,
because it adds a function call at every assignment statement, and
when the variable goes out of scope.

Ada is often used in time-critical embedded systems, where needless
procedure-call overhead may be a significant cost.

OTOH, when you assign a new value to an object with a destructor, does
C++ call the destructor before assigning the new value?  Or is that even
a meaningful question for C++?

Best,
Sam Mize

-- 
Samuel Mize -- smize@imagin.net (home email) -- Team Ada
Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam




  parent reply	other threads:[~1999-03-09  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-07  0:00 More questions Michael Young
1999-03-08  0:00 ` Steve Doiel
1999-03-08  0:00 ` James S. Rogers
1999-03-08  0:00   ` Hyman Rosen
1999-03-10  0:00     ` Matthew Heaney
1999-03-09  0:00 ` Samuel Mize [this message]
1999-03-09  0:00   ` Hyman Rosen
1999-03-10  0:00   ` robert_dewar
1999-03-09  0:00 ` Samuel Mize
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox