From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D4C5E1F9FC for ; Fri, 23 Dec 2022 11:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1671793515; bh=Lg0VbMvvd/S2DX6nl87RM+99OLFXOtmwOTYuzbqmCxc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qE7Bricy0tuYuE5ugwWUCPqTtTv69r0gnIYCDCT4mqlVsgnJgVsSF1YCJ7YOpGJDI y2g1zZhKwy6TFMettSoXaUJC2hc0lBRTrVkWVHHUp1leUYWj2UHpVCqVIZ/Pvywolq sBncTUaBrymsYSLISFed3v8g14vCqeNhrOuORrr0= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/4] httpd/async: remove useless undef Date: Fri, 23 Dec 2022 11:05:13 +0000 Message-Id: <20221223110515.19907-3-e@80x24.org> In-Reply-To: <20221223110515.19907-1-e@80x24.org> References: <20221223110515.19907-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index 9e592f47..75b3bd50 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -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; }