artax has asked for the wisdom of the Perl Monks concerning the following question:

I'm write the simple program belowe to test thread.
If I run it inside an IDE (komodo) I got the following output:
THREAD support enabled [sub1] thread 18917 params: 0 1 Attempt to free unreferenced scalar: SV 0x8661170, Perl interpreter: 0 +x86388b8 during global destruction.

Why I got the warning : Attempt to free unreferenced scalar... inside the IDE ?
BTW: If I tun it from console I didn't get this wrning. Regards, Enzo
Sample code
#!/usr/bin/perl -w use strict; use Config; use threads; my( $th, $thres ); $th = threads->new( \&sub1, 0, 1 ); $thres = $th->join; # ============ sub sub1 { my @params = @_; my ( $stmp ); $stmp = join ' ', @params; print "[sub1] thread $$ params: $stmp \n"; }

Edited by Chady: replaced pre tags with code tags.

  • Comment on threads: Attempt to free unreferenced scalar: SV 0x8661170, Perl interpreter: 0x86388b8 during global destruction.
  • Select or Download Code

Replies are listed 'Best First'.
Re: threads: Attempt to free unreferenced scalar: SV 0x8661170, Perl interpreter: 0x86388b8 during global destruction.
by BrowserUk (Patriarch) on Sep 23, 2006 at 15:58 UTC

    Does your ide use the same version of Perl as you run from the command line?

    It is only a warning, and can be disabled with no warnings 'threads';, if the version of perl involved is late enough, but since it only happens under the ide, it's hardly worth worrying about. You could try upgrading komodo if you are not running the latest version.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.