From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28403 invoked by alias); 4 Feb 2011 19:55:32 -0000 Received: (qmail 28392 invoked by uid 22791); 4 Feb 2011 19:55:31 -0000 X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_BOGUSMX,SARE_HEAD_XWORD,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from caprica.metux.de (HELO mailgate.caprica.metux.de) (82.165.128.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Feb 2011 19:55:26 +0000 Received: from mailgate.caprica.metux.de (localhost.localdomain [127.0.0.1]) by mailgate.caprica.metux.de (8.14.4/8.14.4) with ESMTP id p14Jq1x4024001 for ; Fri, 4 Feb 2011 20:52:01 +0100 Received: (from uucp@localhost) by mailgate.caprica.metux.de (8.14.4/8.14.4/Submit) with UUCP id p14JpQ9O023977 for gcc-help@gcc.gnu.org; Fri, 4 Feb 2011 20:51:26 +0100 Received: (from weigelt@localhost) by nibiru.metux.de (8.12.10/8.12.10) id p14Jk4rO006746 for gcc-help@gcc.gnu.org; Fri, 4 Feb 2011 20:46:04 +0100 Date: Fri, 04 Feb 2011 20:25:00 -0000 From: Enrico Weigelt To: gcc-help@gcc.gnu.org Subject: C++ and garbage collection Message-ID: <20110204194604.GB12837@nibiru.local> Reply-To: weigelt@metux.de Mail-Followup-To: gcc-help@gcc.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Terror: bin laden, kill bush, Briefbombe, Massenvernichtung, KZ, X-Nazi: Weisse Rasse, Hitlers Wiederauferstehung, 42, X-Antichrist: weg mit schaeuble, ausrotten, heiliger krieg, al quaida, X-Killer: 23, endloesung, Weltuntergang, X-Doof: wer das liest ist doof X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00108.txt.bz2 Hi folks, I'm currently working on an complex C++ application (which I, if it would have to be rewritten from scratch, would do in Java instead ;-o) and I wonder whether it's possible to move to an garbage collection in smaller steps. For now there're some parts using some "autopointer" class (didn't deeply look into it, but I guess it's overloading the pointer operations and doing some reference counting, which of course isn't generally complete - would keep ring structures forever ;-o). My idea is to add some mark+sweep gc (boem-gc ?) and remove (or somehow disable) all delete operations. Does that work safely, or do I have to cope with certain nasty side effects ? thx -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weigelt@metux.de mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------