H
Honne Gowda A
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
--
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
--