From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QRqcNn55+mhZ4wQAWB0awg (envelope-from ) for ; Thu, 23 Oct 2025 14:52:46 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=e+qzJCQp; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DB6A11E0BC; Thu, 23 Oct 2025 14:52:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8C6511E057 for ; Thu, 23 Oct 2025 14:52:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39EEB3858290 for ; Thu, 23 Oct 2025 18:52:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39EEB3858290 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=e+qzJCQp Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id C474C385801B for ; Thu, 23 Oct 2025 18:52:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C474C385801B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C474C385801B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761245535; cv=none; b=oEz6FSvW8YBuZyy+T1nU5xYWCftUH/NB3q2+lH4NE4rPvfH+5b0EDc4R5vUmZ4E42qsR+9Vj6AxvHgNZ3Rd8jR8F8BDrPKxlf8Bk/w+HDr4zjFxRqrzH66hvrvnmAiz1NqWj/WT+EbrL8J577eOljKxHI/YZ34ZjHFuqYjcjvFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1761245535; c=relaxed/simple; bh=uGEafV7UF87SFRgeQuTOSlfdQktlp5WslX4Asxk5Ab4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Jr1RPkc0rn77UPZuv0DUWkw3VbqmoZlWKk6VziEpt9bXfy3d0LZRHd8Ziaxs7uuA1pQaDW7o8FaUv6BY3gutL6mSCb+8QJO4npFqx0Pvd4rxpD+Fgk/226LDBnK9w6BwMIdp6OIDbMFs6bwlLQGVWsFlzyNGnaM4+YYkk+Bphzg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C474C385801B Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id BuNgvtcl6SkcfC0Q3valqk; Thu, 23 Oct 2025 18:52:15 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id C0Q2vpAgL9m9eC0Q2vNoKN; Thu, 23 Oct 2025 18:52:14 +0000 X-Authority-Analysis: v=2.4 cv=eMQTjGp1 c=1 sm=1 tr=0 ts=68fa795e a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=x6icFKpwvdMA:10 a=ItBw4LHWJt0A:10 a=dzWzf_mpAAAA:8 a=qySPx7JOIoJLSAS8p8cA:9 a=b4DR9a7p2ZdsqdHBznES:22 a=VS4QxaUSPT0UtbFnIvSC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/55RhlyykMgclUKaNm0jien5CiWlAr5jsszSvQcQ7aA=; b=e+qzJCQpoEyKiui/Yyd+xomK/1 PYdraJjdTzGA8KCbdJBJ9Ae9+4SWowVzn8v+yTKKonRSBs/E06OHvf79uWz+WjPaViTB24jjisRz2 aooWp+tCYzGnrlcmZrO+8+zws; Received: from 97-122-110-68.hlrn.qwest.net ([97.122.110.68]:43530 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vC0Q1-00000004Joi-3Mj7; Thu, 23 Oct 2025 12:52:13 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] Free multidicts from blockvector In-Reply-To: (Simon Marchi's message of "Thu, 23 Oct 2025 14:31:45 -0400") References: <20251023-mdict-free-v1-0-ad02b2bdd549@tromey.com> <20251023-mdict-free-v1-2-ad02b2bdd549@tromey.com> X-Attribution: Tom Date: Thu, 23 Oct 2025 12:52:12 -0600 Message-ID: <873479bgdf.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.68 X-Source-L: No X-Exim-ID: 1vC0Q1-00000004Joi-3Mj7 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-68.hlrn.qwest.net (prentzel) [97.122.110.68]:43530 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfIiw/X7a0rNQC1qH7vkl1NOpdfXz8g6z60e98b9RDaGY2CFJASRbRgxANu0BisD3RMQZDX2VdejqYd8UVnW4s959RHWKpYd1fYj3r1J87t2mhYMsUe3s IWKo67qfbuFcmSJHAXS45ouJpPad9ZP7ZK/++SkmwlcUkxZ4UUQ+YngwcyD2UNPKSpu91k0fdvjiJ1lFed79tioJtiTIKRu5u8Y= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Simon" == Simon Marchi writes: >> + for (struct block *bl : m_blocks) >> + mdict_free (bl->multidict ()); >> +} Simon> Ideally it would be struct block's just to call that. You could add a Simon> destructor to struct block and call it explicitly here. It would be the Simon> same result, but would be more correct encapsulation-wise. But I guess Simon> this is fine too for the time being. Yeah. I have kind of an aversion to explicit destructor calls. Though maybe not for any good reason. Simon> Since there is a user-defined destructor, I would add a Simon> DISABLE_COPY_AND_ASSIGN. Otherwise, LGTM. I did this. Tom