A
arun
Hello Group,
The compiler generated destructor will invoke destructor of each member
of the containing
class let us say 'class A'. However, if I write my own destructor for
class A like;
class Object1 {
// code here
};
class Object2{
// code here
};
class Object3 {
// code here
};
class A{
public:
Object1 o1;
Object2 o2;
Object3 o3;
};
The question is if I have a destructor and implement it as
~A() {}
Will the objects o1, o2, o3's destructor be still invoked, when class A
goes out of scope.
Thanks
nagrik
The compiler generated destructor will invoke destructor of each member
of the containing
class let us say 'class A'. However, if I write my own destructor for
class A like;
class Object1 {
// code here
};
class Object2{
// code here
};
class Object3 {
// code here
};
class A{
public:
Object1 o1;
Object2 o2;
Object3 o3;
};
The question is if I have a destructor and implement it as
~A() {}
Will the objects o1, o2, o3's destructor be still invoked, when class A
goes out of scope.
Thanks
nagrik