delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/11/04/08:38:37

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 <egon AT heaven DOT industries DOT cz>
To: djgpp AT delorie DOT com
Subject: Re: Destructor being called twice?
Message-ID: <20041104133817.GB13990@webhome.cz>
References: <opsgtcaqh37iosox AT dhcp9540189 DOT columbus DOT rr DOT com> <7b68d58f DOT 0411020754 DOT 2d857a9 AT posting DOT google DOT com> <opsgwx9vk47iosox AT dhcp9540189 DOT columbus DOT rr DOT com>
Mime-Version: 1.0
In-Reply-To: <opsgwx9vk47iosox@dhcp9540189.columbus.rr.com>
User-Agent: Mutt/1.5.6+20040722i
Sender: Egon Eckert <egon AT webhome DOT cz>
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

> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019