comp.lang.ada
 help / color / mirror / Atom feed
* differentiating finalization causes
@ 1997-10-29  0:00 Pat Rogers
  1997-11-01  0:00 ` Matthew Heaney
  0 siblings, 1 reply; 2+ messages in thread
From: Pat Rogers @ 1997-10-29  0:00 UTC (permalink / 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?





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-11-01  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-29  0:00 differentiating finalization causes Pat Rogers
1997-11-01  0:00 ` Matthew Heaney

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