X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Thu, 4 Nov 2004 14:38:17 +0100 From: Egon Eckert To: djgpp AT delorie DOT com Subject: Re: Destructor being called twice? Message-ID: <20041104133817.GB13990@webhome.cz> References: <7b68d58f DOT 0411020754 DOT 2d857a9 AT posting DOT google DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i Sender: Egon Eckert Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > I did not think that I needed a copy constructor, since I'm only > instantiating this object once, and as a global object. That's true, for that purpose you don't need it. Anyway, did my answer (about the gcc 3.4.x bug) reach you? Which version of gcc are you using? If possible, try this: GlobalSettings* GS; int main() { GS = new GlobalSettings; GS->edit_header(); delete GS; return 0; } If this helps, you hit the gcc bug. Egon