http://qs1969.pair.com?node_id=1173215


in reply to Perl and Garbage Collection

The GC of Perl does very good work, it collects all variables that it is supposed to :) But each GC has its limitations. Otherwise, there would be no need in things like "weak references". They are available in Java, C#, Perl and few other languages.

Creating memory leak in Java is very easy. Just add event listener while building GUI, and then discard it without unregistering. GC is convenient, but it does not mean, that programmer should not think about memory management. That thing is unavoidable. So, just like in any other programming language, one has to know about peculiarities of GC in Perl, and then manage memory appropriately.

On a side note, I believe C is the best language for development. Simply because it does not pretend, that one should not worry about memory management :)