]> Sergey Matveev's repositories - public-inbox.git/commitdiff
httpd/async: remove useless undef
authorEric Wong <e@80x24.org>
Fri, 23 Dec 2022 11:05:13 +0000 (11:05 +0000)
committerEric Wong <e@80x24.org>
Fri, 23 Dec 2022 12:44:23 +0000 (12:44 +0000)
Assigning `undef' to a scalar doesn't free it's memory,
we need to call `undef($var)' in the caller.  It's also
been pointless since we simplified ->async_pass in commit
b7fbffd1f8c12556 (httpd/async: get rid of ephemeral main_cb, 2019-12-25)

lib/PublicInbox/HTTPD/Async.pm

index 9e592f47412bf4f7aa1c32555196ee92b13a06de..75b3bd50e9a0ddeecee96fdf862d21ce92c00528 100644 (file)
@@ -84,10 +84,6 @@ sub async_pass {
        # *_wcb methods respond to ->write (and ->close), not ->print
        $fh->write($$bref);
 
-       # we're done with this, free this memory up ASAP since the
-       # calls after this may use much memory:
-       $$bref = undef;
-
        $self->{http} = $http;
        $self->{fh} = $fh;
 }