From: Bob Hutchison Date: 2002-05-24T03:26:41+09:00 Subject: Re: Stymied by Ruby's garbage collector On 5/23/02 2:09 PM, "Paul Brannan" wrote: > On Fri, May 24, 2002 at 02:28:42AM +0900, Patrick May wrote: >> A gc language prevents memory leaks, it makes no performance guarantees :-) > > It helps to alleviate memory leaks, but it does not prevent them. I can > still get memory leaks by forgetting to remove a reference to an object > from a hash, or by not being careful when registering finalizers. Funny how meanings shift over time. Yes what you are saying is a usage of the term that is occasionally used these days. However, once upon a time, there were *real* 'memory leaks' and 'dangling pointers'. When allocated memory had no reference to it that was leaked memory -- there was no finding that memory again, so no deallocation of it. When you had a pointer that pointed at deallocated memory you had a dangling pointer -- who know what would happen but nothing good (the deallocated memory would be re-allocated). Both exceedingly difficult to debug, even detect sometimes. Both are completely prevented by GC. The meaning you use is not the same thing at all.