From: Stephen Tweedie (sct@dcs.ed.ac.uk)
Date: 07/01/93


From: sct@dcs.ed.ac.uk (Stephen Tweedie)
Subject: Re: [BUG? C++ lib]: C++ problem. (core dumps!)
Date: 1 Jul 1993 18:45:21 GMT

On 1 Jul 93 03:50:52 GMT, rand@world.std.com (Randolph G Brown) said:

> Never mind. :-)

> I had a constant bug in these programs of using a deleted pointer, and
> it was a linked list so in my destructor i should have been trying to
> free memory all over the place in my destructor.

Rule number 124: always use a debugging malloc library. It should
work fine in even in conjunction with C++.

I do a fair amount of serious C++ programming under Linux (currently
with gcc-2.4.5), and have code which makes intensive use of complex
constructors/destructors and multiple inheritance over a set of a two
or three dozen object classes on top of the standard libg++ classes.
Although it compiles perfectly, I have lost track of the number of
times that a bug in my own code has only been tracked down because of
the debugging malloc.

Cheers,
 Stephen.