From: Eric Mahurin Date: 2005-10-16T23:19:54+09:00 Subject: Re: Help! define_method leaking procs... --- ts wrote: > >>>>> "E" == Eric Mahurin writes: > > E> to memory that isn't being freed. From the ruby script > level > E> for this example, by both of these definitions it is a > memory > E> leak. From ruby itself, ruby probably still has > references to > E> the memory, so (b) may not call it a "memory leak". To me > (a) > E> is the right definition because it describes symtoms not > the > E> mechanism. If any program keeps growing in memory and it > E> shouldn't, I'd say it has a memory leak. It doesn't > matter how > E> it comes about and whether or not the program could free > the > E> memory if it was fixed, it is still "leaking" memory. > > No please. > > You are writing stupid program, don't expect that ruby > correct what you > write. ruby is a programming language, first learn it before > trying to > blame it. The above paragraph doesn't even blame ruby. This thread started with a real ruby program "leaking" memory. I gave a possible reason as that closures hold strong references to all variables in there scope (with a leaky example). Matz also responded to this thread giving the exact same possibility. He has also discussed addressing this issue in another thread (where he said eval could be a keyword). Does he need to go learn the language better too? __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com