From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28499 invoked by alias); 18 Oct 2011 16:35:45 -0000 Received: (qmail 28386 invoked by uid 22791); 18 Oct 2011 16:35:42 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Oct 2011 16:35:21 +0000 Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p9IGZKkF025827 for ; Tue, 18 Oct 2011 09:35:20 -0700 Received: from pzk1 (pzk1.prod.google.com [10.243.19.129]) by hpaq13.eem.corp.google.com with ESMTP id p9IGX6M2020022 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 18 Oct 2011 09:35:18 -0700 Received: by pzk1 with SMTP id 1so2426275pzk.9 for ; Tue, 18 Oct 2011 09:35:18 -0700 (PDT) Received: by 10.68.74.65 with SMTP id r1mr5933355pbv.87.1318955718424; Tue, 18 Oct 2011 09:35:18 -0700 (PDT) Received: by 10.68.74.65 with SMTP id r1mr5933337pbv.87.1318955718273; Tue, 18 Oct 2011 09:35:18 -0700 (PDT) Received: from coign.google.com ([2620:0:1000:2301:21c:25ff:fe14:8d86]) by mx.google.com with ESMTPS id ml4sm8905330pbc.0.2011.10.18.09.35.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Oct 2011 09:35:17 -0700 (PDT) From: Ian Lance Taylor To: Basile Starynkevitch Cc: gcc@gcc.gnu.org Subject: Re: adding destroyable objects into Ggc References: <20111018171201.361304028ab94f102f827bd2@starynkevitch.net> Date: Tue, 18 Oct 2011 17:11:00 -0000 In-Reply-To: <20111018171201.361304028ab94f102f827bd2@starynkevitch.net> (Basile Starynkevitch's message of "Tue, 18 Oct 2011 17:12:01 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00280.txt.bz2 Basile Starynkevitch writes: > I would like to add destroyable objects into Ggc (the GCC garbage collector, see files > gcc/ggc*.[ch]). I think this type of thing is conventionally called a "finalizer". I'm ambivalent leaning to negative to adding this feature to the gcc garbage collector. In the long run I would like to use the gcc garbage collector less and less. I believe that we can use C++ smart pointers to move in that direction. I understand that you want to take advantage of the gcc garbage collector for the MELT plugin. However, in my ideal world you should be planning for the MELT plugin to take over garbage collection entirely, rather than relying on gcc's garbage collector. Ian