]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/View.pm
release large (non ref) scalars using `undef $sv'
[public-inbox.git] / lib / PublicInbox / View.pm
index 1e53d8dc2ae133d7e58ac898021c632e618bb597..ddd94e48f730a2a493f913d9a43f3b6fd9dd1ac2 100644 (file)
@@ -566,7 +566,7 @@ sub add_text_body { # callback for msg_iter
 
        # split off quoted and unquoted blocks:
        my @sections = PublicInbox::MsgIter::split_quotes($s);
-       $s = '';
+       undef $s; # free memory
        my $rv = $ctx->{obuf};
        if (defined($fn) || $depth > 0 || $err) {
                # badly-encoded message with $err? tell the world about it!
@@ -587,7 +587,7 @@ sub add_text_body { # callback for msg_iter
                        # regular lines, OK
                        $$rv .= $l->to_html($cur);
                }
-               $cur = undef;
+               undef $cur; # free memory
        }
 
        obfuscate_addrs($ibx, $$rv) if $ibx->{obfuscate};