ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/Timer.pm
(Generate patch)

Comparing Coro/Coro/Timer.pm (file contents):
Revision 1.29 by root, Mon Dec 26 18:48:11 2005 UTC vs.
Revision 1.30 by root, Thu Dec 29 14:06:55 2005 UTC

73sub bool { 73sub bool {
74 !${${$_[0]}} 74 !${${$_[0]}}
75} 75}
76 76
77sub DESTROY { 77sub DESTROY {
78 ${${$_[0]}}->cancel; 78 ${${$_[0]}}->cancel if ${${$_[0]}};
79 undef ${${$_[0]}}; # without this it leaks like hell. breaks the circular reference inside the closure 79 undef ${${$_[0]}}; # without this it leaks like hell. breaks the circular reference inside the closure
80} 80}
81 81
82use overload 'bool' => \&bool, '0+' => \&bool; 82use overload 'bool' => \&bool, '0+' => \&bool;
83 83

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines