Sequence of constructor calls and destructor calls.

From: Honne Gowda A (honne_at_lucent.com)
Date: 10/31/03

  • Next message: Christian Gollwitzer: "Re: calling GNUPLOT from a c++ program"
    Date: Fri, 31 Oct 2003 13:42:54 +0530
    
    

    Hi,
    Can anybody clarify why destruction happens in reverse way?
    for example A<-B<-C, when C's object is constructed, ctor calls will A(),B() and
    C(), when this object is destroyed, sequence of calls will be ~C(),~B(),and
    ~C(). I am wondering why cant' we destroy the object like ctor way?..Are there
    any good reasons for this?

    thanks,
    -Honne

    --
    

  • Next message: Christian Gollwitzer: "Re: calling GNUPLOT from a c++ program"