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.
In reply to Re: Timing of garbage collection
by dave_the_m
in thread Timing of garbage collection
by dd-b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |