Connecting Tech Pros Worldwide Help | Site Map

Which destructor is called in which sequence at the end of the main program?

  #1  
Old December 21st, 2007, 06:55 AM
Mark Sullivan
Guest
 
Posts: n/a
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

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Design Patterns: The Singleton weaknessforcats insights 3 May 5th, 2008 01:38 AM
.Net frameword Resources ( vb.net , asp.net etc...) shamirza answers 0 January 17th, 2007 08:05 AM