I'm getting a ton of errors about "Attempt to free non-existent shared string". These errors are coming from LinkExtor as they're all HTML tags.
Attempt to free non-existent shared string 'embed'. Attempt to free non-existent shared string 'xmp'. Attempt to free non-existent shared string 'object'. Attempt to free non-existent shared string 'tr'. Attempt to free non-existent shared string 'a'. Attempt to free non-existent shared string 'input'. Attempt to free non-existent shared string 'area'. Attempt to free non-existent shared string 'form'. Attempt to free non-existent shared string 'table'. Attempt to free non-existent shared string 'frame'. Attempt to free non-existent shared string 'img'. Attempt to free non-existent shared string 'body'. Attempt to free non-existent shared string 'isindex'. Attempt to free non-existent shared string 'bgsound'. Attempt to free non-existent shared string 'th'. Attempt to free non-existent shared string 'base'. ... Scalars leaked: -32 Bad signature in parser state object at 8359668. Unbalanced string table refcount: (1) for "tr" during global destructi +on. Unbalanced string table refcount: (1) for "isindex" during global dest +ruction. Unbalanced string table refcount: (1) for "applet" during global destr +uction. Unbalanced string table refcount: (1) for "del" during global destruct +ion. Unbalanced string table refcount: (1) for "_parser" during global dest +ruction. Unbalanced string table refcount: (1) for "input" during global destru +ction. Unbalanced string table refcount: (1) for "table" during global destru +ction. Unbalanced string table refcount: (1) for "link" during global destruc +tion. ... Scalars leaked: 37
Any ideas? Relevant code:
my @retlinks; if ($res->is_success) { $self->parser->parse($res->content); my @links = $self->parser->links; my $linkarray; foreach $linkarray (@links){ my @element = @$linkarray; my $elt_type = shift @element; while(@element){ my ($attr_name, $attr_val) = splice(@element, +0, 2); if($elt_type eq 'a' && $attr_name eq 'href'){ unshift(@retlinks, url($attr_val, $res +->base)->abs); } } } }
It all worked fine until I made that method threaded and then everthing went a little crazy. Advice appreciated. Thanks.

In reply to LinkExtor Threading Leaks? by ramblinpeck

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.