From: "Peter C. Chapin" <pchapin@sover.net>
Subject: Re: Question about controlled types.
Date: Thu, 07 Feb 2008 22:46:57 -0500
Date: 2008-02-07T22:46:57-05:00 [thread overview]
Message-ID: <47abd0b0$0$32511$4d3efbfe@news.sover.net> (raw)
In-Reply-To: <f063ec6a-86d1-42d9-b8bb-055d1de00ba5@m34g2000hsf.googlegroups.com>
Adam Beneschan wrote:
> Did you read the rest of the paragraph? "As explained below, the
> implementation may eliminate the intermediate anonymous object, so
> this description subsumes the one given in 5.2, 'Assignment
> Statements'".
Well the anonymous object, and its existence or lack thereof, is not
what I'm worried about... I admit my earlier post may have been unclear
on that point. My main concern was in how to use controlled types in an
"exception safe" way.
However, it occurred to me today that if the implementation supports
garbage collection my example would work fine. In that case Finalize
wouldn't have to do anything. Adjust would still make a copy, but if
creating that copied failed during the assignment to A (the final
target), it would still be okay to share heap structures with the
anonymous object. When the anonymous object vanished those structures
would just be owned by A and not become garbage as they would have
otherwise.
Anyway, thanks for your detailed reply!
Peter
prev parent reply other threads:[~2008-02-08 3:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 1:19 Question about controlled types Peter C. Chapin
2008-02-07 4:54 ` Hyman Rosen
2008-02-07 16:30 ` Robert A Duff
2008-02-08 3:31 ` Peter C. Chapin
2008-02-08 3:47 ` Peter C. Chapin
2008-02-07 16:47 ` Adam Beneschan
2008-02-08 3:46 ` Peter C. Chapin [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox