memory leak in httpd or child process (what is a memory leak)

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Dec 22 21:54:18 UTC 2005


On Tue, Dec 20, 2005 at 09:41:51PM -0500, Tim Writer wrote:
> There are garbage collectors available for C, most notably the Boehm
> Demers Weiser conservative garbage collector:
> 
>     http://www.hpl.hp.com/personal/Hans_Boehm/gc/
> 
> Also, many C++ programs use a weak form of garbage collection known as
> reference counting.
> 
> Why more C/C++ developers (including myself) don't use garbage collection
> more often is a bit of a mystery.

Probably because for some situations they don't work well, and sometimes
you need to control when memory is freed, rather than at some arbitrary
time chosen by the garbage collector.  It is certainly also possible to
write code (arguably badly) in such a way that you are still considering
it in use and know where it is, but the garbage collector thinks you are
done with it.

I prefer to know when things are freed and why.  garbage collection is
for scripting languages :)

Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list