|
Prev: Which destructor is called in which sequence at the end of the main program?
Next: Which (virtual) function from which class is called?
From: jalina on 21 Dec 2007 03:17 Mark Sullivan a �crit : > Assume I have the following code structure: > > class A .... { ..... } > > > class B .... { .... } > > main () { > > A a; > B b; > > .... > > } > > Both objcts a and b are created at the beginning. > > But when the main program reaches the end which destructor is called first: > > ~A() > > or > > ~B() > > ? > Mark > ~B() first then ~A() |