Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl and Garbage Collection

by andal (Hermit)
on Oct 04, 2016 at 07:44 UTC ( [id://1173215]=note: print w/replies, xml ) Need Help??


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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1173215]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-16 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found