For Programmers: Free Programming Magazines  


Home > Archive > ithreads > June 2007 > Re: threads error: Attempt to free unreferenced scalar...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: threads error: Attempt to free unreferenced scalar...
Jerry D. Hedden

2007-06-26, 7:30 pm

Jerry D. Hedden wrote:
> The following code snippet produces the error:
>
> use threads;
>
> sub thr
> {
> # Causes 'Attempt to free unreferenced scalar: ...' message
> threads->new($_[0]);
>
> # Okay - no message
> #threads->new(shift);
> }
>
> thr(sub { })->join;
>
> Is this the same problem as
> http://rt.perl.org/rt3/Ticket/Display.html?id=41138
> and
> http://rt.perl.org/rt3/Ticket/Display.html?id=41816
> but in the opposite direction (leaked vs unref'ed)?


Here's another example posted to perl-ithreads@perl.org:

use threads;

my $my_sub = sub { };

threads->create($my_sub)->join();

Dave, any tuits available to look into all of this?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com