comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@acm.org>
Subject: differentiating finalization causes
Date: 1997/10/29
Date: 1997-10-29T00:00:00+00:00	[thread overview]
Message-ID: <01bce4a2$b0ad17e0$020c6dce@my-pc.neosoft.com> (raw)


For a type descended from Controlled, I need to be able to differentiate
finalization due to object destruction from finalization due to assignment
("value destruction", if you will).  At present I use the subsequent call
to Adjust to set a flag, with other routines checking the flag to see if
the effect of Finalize was really due to assignment.  However, Finalize is
responsible for placing an item in a list, and Adjust must search the list,
looking for the corresponding node (in which to set the flag).  I don't
want to search this list each time Adjust is called, but of course I cannot
keep a pointer to the node in the controlled object itself, since
assignment will overwrite it with the value on the right-hand side.  Are
there any "tricks" or techniques for differentiating between the two causes
of finalization?





             reply	other threads:[~1997-10-29  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-29  0:00 Pat Rogers [this message]
1997-11-01  0:00 ` differentiating finalization causes Matthew Heaney
replies disabled

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