Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #10098
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Memory Leak Detection |
| Date | 2011-09-14 20:29 +1200 |
| Message-ID | <9db706F784U5@mid.individual.net> (permalink) |
| References | <7be371ee-c86c-4686-adbb-d0f3f716cde9@j1g2000yqn.googlegroups.com> <1073300f-64a0-4665-9e6e-a5000808b407@z7g2000vbp.googlegroups.com> <buo7h5bbv4j.fsf@dhlpc061.dev.necel.com> <4e70444c$0$4388$7b1e8fa0@news.nbl.fi> |
On 09/14/11 06:06 PM, Juha Nieminen wrote: > Miles Bader<miles@gnu.org> wrote: >> [Running valgrind on a program for the first time can be a rude shock >> though, revealing tons of little bugs that you never noticed before!] > > Actually if you have followed the basic rules of RAII and all the > rules that naturally follow from it (such as the so-called rule of > three, never use a raw 'new', use the STL whenever it's suitable, and > so on), such bugs become rarer and rarer. The most recent one I found (using dbx, not valgrind) was a bug in a system library flushed out by me using RAII to match library allocations and deallocations. With the "proper" code I got duplicate free errors and without it I got a memory leak! In the end I settled for the leak and a bug report. -- Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Memory Leak Detection Christopher <cpisz@austin.rr.com> - 2011-09-13 08:55 -0700
Re: Memory Leak Detection Noah Roberts <roberts.noah@gmail.com> - 2011-09-13 09:13 -0700
Re: Memory Leak Detection Paavo Helde <myfirstname@osa.pri.ee> - 2011-09-13 12:36 -0500
Re: Memory Leak Detection "AnonMail2005@gmail.com" <anonmail2005@gmail.com> - 2011-09-13 11:45 -0700
Re: Memory Leak Detection Miles Bader <miles@gnu.org> - 2011-09-14 13:33 +0900
Re: Memory Leak Detection Juha Nieminen <nospam@thanks.invalid> - 2011-09-14 06:06 +0000
Re: Memory Leak Detection Miles Bader <miles@gnu.org> - 2011-09-14 15:24 +0900
Re: Memory Leak Detection Ian Collins <ian-news@hotmail.com> - 2011-09-14 20:29 +1200
Re: Memory Leak Detection Marc <marc.glisse@gmail.com> - 2011-09-14 20:11 +0000
Re: Memory Leak Detection Goran <goran.pusic@gmail.com> - 2011-09-14 00:38 -0700
Re: Memory Leak Detection Christopher <cpisz@austin.rr.com> - 2011-09-14 08:22 -0700
Re: Memory Leak Detection Goran <goran.pusic@gmail.com> - 2011-09-15 01:09 -0700
Re: Memory Leak Detection Christopher <cpisz@austin.rr.com> - 2011-09-16 14:30 -0700
csiph-web