DEVELOP > c-Plus-Plus > Which destructor is called in which sequence at the end of the main program?
| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"Mark Sullivan" |
| Date: |
21 Dec 2007 12:48:26 AM |
| Object: |
Which destructor is called in which sequence at the end of the main program? |
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
.
|
|

|
Related Articles |
|
|