Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Timing of garbage collection

by dave_the_m (Parson)
on Jan 18, 2013 at 21:50 UTC ( #1014137=note: print w/ replies, xml ) Need Help??


in reply to Timing of garbage collection

As I understand it, object destruction happens in garbage collection, which is not guaranteed to happen at any particular time (before process termination). I must not count on actions in the destructor happening promptly when the last reference to an object goes away.
No, perl uses reference counting rather than mark-and-sweep style garbage collection, so an object is guaranteed to be destroyed (and any destructor called) immediately its reference count goes to zero, not some random time later.

Dave.


Comment on Re: Timing of garbage collection

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2014-08-29 22:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (289 votes), past polls