X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTask.pm;h=434019825aadebcb8dee0ffa3146f67f2d492772;hb=87eef33eee0a92bf11aa4d4fcc061526f9176a50;hp=8e3f251a26330d543fca904f8046003ddb6b7e7d;hpb=42a6319d3dd983f11a4318e83dce3c02014835f2;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Task.pm b/lib/ZOOM/IRSpy/Task.pm index 8e3f251..4340198 100644 --- a/lib/ZOOM/IRSpy/Task.pm +++ b/lib/ZOOM/IRSpy/Task.pm @@ -6,6 +6,8 @@ use 5.008; use strict; use warnings; +use Scalar::Util; + =head1 NAME ZOOM::IRSpy::Task - base class for tasks in IRSpy @@ -34,7 +36,7 @@ sub new { my $class = shift(); my($conn, $udata, $options, %cb) = @_; - return bless { + my $this = bless { irspy => $conn->{irspy}, conn => $conn, udata => $udata, @@ -42,6 +44,11 @@ sub new { cb => \%cb, timeRegistered => time(), }, $class; + + #Scalar::Util::weaken($this->{irspy}); + #Scalar::Util::weaken($this->{udata}); + + return $this; }