[C++-sig] Re: Indexing_suite when container is newed

Raoul Gough RaoulGough at yahoo.co.uk
Thu Oct 16 17:45:25 CEST 2003


"Niall Douglas" <s_sourceforge at nedprod.com> writes:

> On 15 Oct 2003 at 19:57, Raoul Gough wrote:
[snip]
>> Well, if I was in danger of forgetting how much easier programming
>> with std::vector and boost::shared_ptr is compared to malloc and
>> arrays in C, you've just reminding me :-)
>
> Strangely enough, I never had problems with malloc like others did. 
> My last C project was 30,000 lines long and only had six memory leaks 
> but I'm guessing this mostly results from me being originally an 
> assembler programmer.

It's not such a problem when you manage to find the leaks early
enough, but systematically avoiding them would be even better. I
worked on a mature project once that had been in widespread production
use for about five years at the time. One of the support requests I
dealt with was for a memory leak, which nobody had ever noticed
before. The particular customer sent in the request for a fix because
their devices kept running out of memory and requiring rebooting every
week or so. Turns out the scripts they were running as part of backup
readiness testing were triggering the leak. A few years later and they
probably would have scrapped the devices because of that one leak,
since support was expiring. My point? Just that memory leaks reduce
the quality of a software system, and don't always appear at a
convenient time :-)

> All this fancy C++ stuff is quite new for me - literally I only
> really properly began about a year and a half ago but thanks to
> Marshall Cline helping me I think I got fairly competent pretty
> quickly. I still have sooo much to learn though.

Sounds like nice work if you can get it.

-- 
Raoul Gough.
(setq dabbrev-case-fold-search nil)





More information about the Cplusplus-sig mailing list