[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]
RE>Re- Constructor bombs f
- To: <michael@xxxxxxxxxxx>
- Subject: RE>Re- Constructor bombs f
- From: heh <heh@xxxxxxxxxx>
- Date: 29 Jun 90 09:58:03
- Cc: <xtech@xxxxxxxxxx>
Reply to: RE>Re: Constructor bombs for
Hallelujah Brother!
I think 95% of the cases where progress variables might be considered can be
easily handled by NULL'ing all the pointers >before< doing any further
construction, allowing the destructor to safely determine what should be thrown
away. (What Michael said...)
Foo::Foo () {
pz = NULL;
px = NULL;
pz = zip ();
px = zap ();
}
Foo::~Foo () {
if (pz != NULL) {
delete pz;
}
if (px != NULL) {
delete px;
}
}
--Hugh