comp.lang.ada
 help / color / mirror / Atom feed
* Why is the destructor called multiple times after I declare an object?
@ 2016-01-11  1:37 Andrew Shvets
  2016-01-11  2:18 ` Jeffrey R. Carter
  0 siblings, 1 reply; 27+ messages in thread
From: Andrew Shvets @ 2016-01-11  1:37 UTC (permalink / raw)


Hello,

This is the code in question:
http://pastebin.com/zf7yEvpe

When I run the executable, this is what I get:
$ ./main_animal 
Resetting values of Creat to defaults.
Resetting values of Creat to defaults.
Resetting values of Creat to defaults.
Resetting values of Creat to defaults.
 The animal:
  The name:        dog
  Number of legs:   4
  Weight in grams:  3000
  Height in cm:     40
 The animal:
  The name:        Elephant
  Number of legs:   4
  Weight in grams:  4000000
  Height in cm:     500
Resetting values of Creat to defaults.
Resetting values of Creat to defaults.

Why is "Resetting values of Creat to defaults." displaying 6 times as opposed to just twice?


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

end of thread, other threads:[~2016-01-14 13:42 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11  1:37 Why is the destructor called multiple times after I declare an object? Andrew Shvets
2016-01-11  2:18 ` Jeffrey R. Carter
2016-01-11  3:35   ` Andrew Shvets
2016-01-11 17:02     ` Brian Drummond
2016-01-11 16:29   ` Brian Drummond
2016-01-11 17:20     ` Simon Wright
2016-01-11 18:17     ` Bob Duff
2016-01-11 21:10       ` Dmitry A. Kazakov
2016-01-11 23:44         ` Randy Brukardt
2016-01-12  9:33           ` Dmitry A. Kazakov
2016-01-12 20:21             ` Randy Brukardt
2016-01-12 21:05               ` Dmitry A. Kazakov
2016-01-13  0:02                 ` Robert A Duff
2016-01-13  8:31                   ` Dmitry A. Kazakov
2016-01-13  9:01                     ` Georg Bauhaus
2016-01-13 14:45                     ` J-P. Rosen
2016-01-13 20:09                       ` Dmitry A. Kazakov
2016-01-14  9:04                         ` J-P. Rosen
2016-01-14  9:47                           ` Dmitry A. Kazakov
2016-01-13 16:03                     ` Robert A Duff
2016-01-13 19:59                       ` Dmitry A. Kazakov
2016-01-14 10:04                         ` Georg Bauhaus
2016-01-14 13:42                           ` Dmitry A. Kazakov
2016-01-12 12:41       ` Brian Drummond
2016-01-13 20:18       ` Jacob Sparre Andersen
2016-01-14  1:31         ` Robert A Duff
2016-01-12  0:43     ` Jeffrey R. Carter

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